From 8728f758dfb154dfd3267ff29000c274eefadfa1 Mon Sep 17 00:00:00 2001 From: Steven Vandevelde Date: Sat, 25 Jan 2025 12:40:46 +0100 Subject: [PATCH 1/2] chore: Rewrite publish workflow to publish on Github pages --- .github/workflows/publish.yml | 36 ++++++++++++++++++++++++++--------- 1 file changed, 27 insertions(+), 9 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 33d3f79..05f98ae 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -4,23 +4,41 @@ on: branches: - main jobs: - publish_job: - name: "🚀 Publish" + build: + name: "🛠️ Build" runs-on: ubuntu-latest steps: - name: 📥 Checkout repository - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: 🧱 Setup node - uses: actions/setup-node@v2 + uses: actions/setup-node@v4 with: node-version: "16" - name: 📦 Install packages run: npm install - name: 🏗 Build assets run: npm run build - - name: 🚀 Publish to production - uses: fission-suite/publish-action@v1 + - name: 💎 Upload static files as artifact + id: deployment + uses: actions/upload-pages-artifact@v3 with: - machine_key: ${{ secrets.FISSION_MACHINE_KEY }} - app_url: ucancheck.fission.app - build_dir: ./build \ No newline at end of file + path: build/ + + publish: + name: "🚀 Publish" + runs-on: ubuntu-latest + needs: build + + permissions: + pages: write # to deploy to Pages + id-token: write + + # Deploy to the github-pages environment + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 From 0fc0bda0dd8233a8b6017cc1ed43373de61a3db8 Mon Sep 17 00:00:00 2001 From: Steven Vandevelde Date: Sat, 25 Jan 2025 12:44:29 +0100 Subject: [PATCH 2/2] chore: Allow to be deployed manually --- .github/workflows/publish.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 05f98ae..89e046e 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -3,6 +3,7 @@ on: push: branches: - main + workflow_dispatch: jobs: build: name: "🛠️ Build"