Skip to content

Commit

Permalink
Add website CI build with artifacts for pull requests
Browse files Browse the repository at this point in the history
  • Loading branch information
hansec committed Feb 27, 2024
1 parent 70dfee4 commit 005b4cc
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion .github/workflows/website.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ on:
# Runs on pushes targeting the default branch
push:
branches: ["gh-pages"]
pull_request:
types: [opened, reopened, synchronize]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
Expand Down Expand Up @@ -61,12 +63,22 @@ jobs:
chmod -c -R +rX "_site/" | while read line; do
echo "::warning title=Invalid file permissions automatically fixed::$line"
done
- name: Upload actions artifact
if: github.event_name == 'pull_request'
uses: actions/upload-artifact@v4
with:
name: pull_${{ github.event.pull_request.number }}-website
path: _site/
overwrite: true

- name: Upload artifact
- name: Upload pages artifact
if: github.event_name != 'pull_request'
uses: actions/upload-pages-artifact@v3

# Deployment job
deploy:
if: github.event_name != 'pull_request'
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
Expand Down

0 comments on commit 005b4cc

Please sign in to comment.