Skip to content

Commit

Permalink
gh-pages
Browse files Browse the repository at this point in the history
  • Loading branch information
inker committed Dec 21, 2023
1 parent 10f2892 commit eba3f29
Showing 1 changed file with 25 additions and 10 deletions.
35 changes: 25 additions & 10 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ name: Deploy GitHub pages

env:
NODE_VERSION: 20
GH_PAGES_DIR: gh-pages-dist
GH_PAGES_DIR: _site

on:
push:
branches:
- master
- gh-pages-pipeline

jobs:
deploy:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -25,10 +25,25 @@ jobs:
run: npm ci --no-audit --no-progress
- name: Build
run: npm run build -- --env out=$GH_PAGES_DIR
- name: Deploy
uses: JamesIves/github-pages-deploy-action@releases/v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: gh-pages # The branch the action should deploy to.
folder: ${{ env.GH_PAGES_DIR }} # The folder the action should deploy.
clean: true
- name: Fix permissions
run: |
chmod -c -R +rX "_site/" | while read line; do
echo "::warning title=Invalid file permissions automatically fixed::$line"
done
- name: Upload artifacts
uses: actions/upload-pages-artifact@v3

deploy:
needs: build
permissions:
pages: write
id-token: write
actions: read
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4

0 comments on commit eba3f29

Please sign in to comment.