diff options
author | matsuyoshi <sfbgwm30@gmail.com> | 2021-08-04 18:05:25 +0300 |
---|---|---|
committer | matsuyoshi <sfbgwm30@gmail.com> | 2021-08-04 18:05:25 +0300 |
commit | 7b5c3b52b12d4f65387bef452f3f8e90492123f8 (patch) | |
tree | 63d421c5e1208f26c1337e5c867535ce7ee05f69 /.github | |
parent | 8b8f217e743e312016fecfa1c298abd82b823113 (diff) |
Add workflows
Diffstat (limited to '.github')
-rw-r--r-- | .github/workflows/build.yml | 30 | ||||
-rw-r--r-- | .github/workflows/gh-pages.yml | 40 |
2 files changed, 70 insertions, 0 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..e41c6a8 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,30 @@ +name: Build example site + +on: + pull_request: + branches: + - master + - exampleSite + +jobs: + build: + runs-on: ubuntu-20.04 + steps: + - name: Git checkout + uses: actions/checkout@v2 + with: + ref: exampleSite + + - name: Get Theme + run: git submodule update --init --recursive + + - name: Update theme to Latest commit + run: git submodule update --remote --merge + + - name: Setup hugo + uses: peaceiris/actions-hugo@v2 + with: + hugo-version: 'latest' + + - name: Build + run: hugo --buildDrafts --gc --verbose --minify diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml new file mode 100644 index 0000000..1d09c7a --- /dev/null +++ b/.github/workflows/gh-pages.yml @@ -0,0 +1,40 @@ +name: Deploy GitHub Pages + +on: + push: + paths-ignore: + - 'images/**' + - 'LICENSE' + - 'README.md' + branches: + - main + - exampleSite + +jobs: + deploy: + runs-on: ubuntu-20.04 + steps: + - name: Git checkout + uses: actions/checkout@v2 + with: + ref: exampleSite + + - name: Get Theme + run: git submodule update --init --recursive + + - name: Update theme to Latest commit + run: git submodule update --remote --merge + + - name: Setup Hugo + uses: peaceiris/actions-hugo@v2 + with: + hugo-version: 'latest' + + - name: Build + run: hugo --buildDrafts --gc --verbose --minify + + - name: Deploy + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./public |