Skip to content

Commit

Permalink
Merge pull request #39 from robot-education/development
Browse files Browse the repository at this point in the history
Tweaked deploy job
  • Loading branch information
AlexKempen authored Feb 10, 2024
2 parents 6a95c16 + 14b8104 commit 3f00bbb
Showing 1 changed file with 31 additions and 7 deletions.
38 changes: 31 additions & 7 deletions .github/workflows/gh-pages-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,16 @@ on:
branches:
- main
jobs:
build-and-deploy:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Checkout repository
uses: actions/checkout@v4
- name: npm install, build, and test
run: |
npm install
npm run build --if-present
npm test
- name: Setup Python
uses: actions/[email protected]
Expand All @@ -24,8 +29,27 @@ jobs:
python3 -m build --production
make html
- name: Deploy
uses: JamesIves/[email protected]
- name: Archive built website
uses: actions/upload-artifact@v4
with:
branch: gh-pages # The branch the action should deploy to.
folder: build/html # The folder the action should deploy.
name: website
path: ./build/html

deploy:
needs: build

# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source

# Deploy to the github-pages environment
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 3f00bbb

Please sign in to comment.