diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 33d3f79..89e046e 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -3,24 +3,43 @@ on: push: branches: - main + workflow_dispatch: 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