Skip to content

Commit

Permalink
Deploy to GitHub Pages directly via Action (#1555)
Browse files Browse the repository at this point in the history
  • Loading branch information
bash committed Jul 15, 2024
1 parent c948138 commit 32b3008
Showing 1 changed file with 18 additions and 5 deletions.
23 changes: 18 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,22 @@ jobs:
echo "Zola version: $(./zola --version)"
- name: Zola build
run: ./zola build
- name: Deploy
if: github.ref == 'refs/heads/source'
uses: crazy-max/ghaction-github-pages@v1
- name: Upload GitHub Pages artifact
uses: actions/upload-pages-artifact@v1
with:
build_dir: public
target_branch: master
path: public

pages:
needs: zola
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
if: format('refs/heads/{0}', github.event.repository.default_branch) == github.ref
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4

0 comments on commit 32b3008

Please sign in to comment.