diff options
-rw-r--r-- | .github/workflows/pages.yml | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml new file mode 100644 index 0000000..fa8ab50 --- /dev/null +++ b/.github/workflows/pages.yml @@ -0,0 +1,36 @@ +name: pages + +on: + push: + branches: + - main + pull_request: + +jobs: + pages: + name: Pages Deployment + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - name: Setup Hugo + uses: peaceiris/actions-hugo@v2 + with: + hugo-version: 'latest' + + - name: Build + run: | + cd exampleSite + mkdir themes + ln -s ../.. themes/fuji + hugo + cd .. + + - name: Deploy + uses: peaceiris/actions-gh-pages@v3 + if: ${{ github.ref == 'refs/heads/main' }} + run: | + cd exampleSite + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./public |