From 94713fb248762941d8603bfae7764cd71a4e3f56 Mon Sep 17 00:00:00 2001 From: dsrkafuu Date: Fri, 25 Feb 2022 00:37:02 +0800 Subject: feat: pages action --- .github/workflows/pages.yml | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/pages.yml (limited to '.github/workflows/pages.yml') 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 -- cgit v1.2.3