Skip to content

Commit

Permalink
redo pages deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
willemolding committed Apr 15, 2024
1 parent 6c6f754 commit 46e139f
Showing 1 changed file with 46 additions and 19 deletions.
65 changes: 46 additions & 19 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
@@ -1,34 +1,61 @@
name: Deploy bridge Github Pages

on:
workflow_dispatch:
release:
types: [published]
on:
workflow_dispatch:
release:
types: [published]

permissions:
contents: write

defaults:
run:
working-directory: bridge-frontend


jobs:
build-and-deploy:
concurrency: ci-${{ github.ref }} # Recommended if you intend to make multiple deployments in quick succession.
deploy:
permissions:
contents: read
pages: write
id-token: write
runs-on: ubuntu-latest
needs: jekyll-build
environment:
name: github-pages
url: ${{steps.deployment.outputs.page_url}}
steps:
- name: Checkout 🛎️
uses: actions/checkout@v4
- name: Deploy artifact
id: deployment
uses: actions/deploy-pages@v1

- name: Install and Build 🔧 # This example project is built using npm and outputs the result to the 'build' folder. Replace with the commands required to build your project, or remove this step entirely if your site is pre-built.
run: |
corepack enable
yarn
yarn codegen
yarn build

- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: bridge-frontend/build # The folder the action should deploy.
jobs:
# Build job
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Pages
id: pages
uses: actions/configure-pages@v3
- name: Build with Yarn
- run: |
corepack enable
yarn
yarn codegen
yarn build
- name: Upload artifact
uses: actions/upload-pages-artifact@v2

# Deployment job
deploy:
environment:
name: github-pages
url: ${{steps.deployment.outputs.page_url}}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2

0 comments on commit 46e139f

Please sign in to comment.