Merge pull request #39 from devsecops-workshop/master #222
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: hugo publish | |
on: | |
push: | |
branches: | |
- master | |
- latest-release | |
jobs: | |
build-deploy: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true | |
ref: latest-release | |
- name: Setup Hugo | |
uses: peaceiris/actions-hugo@v2 | |
with: | |
hugo-version: '0.69.0' | |
- name: Build | |
run: hugo | |
# run: hugo -t hugo-theme-learn | |
- name: Deploy | |
uses: peaceiris/actions-gh-pages@v3 | |
#env: | |
# ACTIONS_DEPLOY_KEY: ${{ secrets.ACTIONS_DEPLOY_KEY }} | |
with: | |
emptyCommits: false | |
commitMessage: ${{ github.event.head_commit.message }} | |
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }} | |
external_repository: devsecops-workshop/devsecops-workshop.github.io | |
publish_branch: master | |
publish_dir: ./public | |
build-deploy-dev: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: true | |
- name: Edit Toml baseurl | |
uses: sandstromviktor/[email protected] | |
with: | |
file: "config.toml" | |
key: "baseurl" | |
value: "https://devsecops-workshop.github.io/devsecops-workshop.github.io-dev/" | |
- name: Edit Toml title | |
uses: sandstromviktor/[email protected] | |
with: | |
file: "config.toml" | |
key: "title" | |
value: "DRAFT : DevSecOps Workshop" | |
- name: Setup Hugo | |
uses: peaceiris/actions-hugo@v2 | |
with: | |
hugo-version: '0.69.0' | |
- name: Build | |
run: hugo | |
# run: hugo -t hugo-theme-learn | |
- name: Deploy | |
uses: peaceiris/actions-gh-pages@v3 | |
#env: | |
# ACTIONS_DEPLOY_KEY: ${{ secrets.ACTIONS_DEPLOY_KEY }} | |
with: | |
emptyCommits: false | |
commitMessage: ${{ github.event.head_commit.message }} | |
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY_DEV }} | |
external_repository: devsecops-workshop/devsecops-workshop.github.io-dev | |
publish_branch: master | |
publish_dir: ./public |