Merge pull request #20 from Green7/patch-2 #48
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: github pages | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
build-deploy: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@master | |
with: | |
submodules: true | |
fetch-depth: 0 | |
- name: Setup Hugo | |
uses: peaceiris/actions-hugo@v2.5.0 | |
with: | |
hugo-version: '0.91.2' | |
# extended: true | |
- name: Copy template files | |
run: cp -r ./repositories/hugo-theme-docdock/* ./src/shared/themes/docdock | |
# VNEXT SITE | |
- name: vNext - Copy shared files to vNext documentation | |
run: cp -r ./src/shared/* ./src/vnext | |
- name: vNext - Remove previous output | |
run: rm -r ./docs/vnext | |
- name: vNext - Run Hugo | |
run: (cd ./src/vnext && hugo --minify) | |
# HOME SITE | |
- name: Home - Copy shared files to vNext documentation | |
run: cp -r ./src/shared/* ./src/home | |
# Note: don't delete previous output for home, it's the root | |
- name: Home - Run Hugo | |
run: (cd ./src/home && hugo --minify) | |
- name: Commit files | |
run: | | |
git config --local user.email "action@github.com" | |
git config --local user.name "GitHub Action" | |
git add -A | |
git commit -m "Automatically generate site" -a | |
- name: Push changes | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
branch: 'master' |