Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Publish on Github Pages #80

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 28 additions & 9 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
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