From a879a20788a90dd39418215428171a93b96b2a6c Mon Sep 17 00:00:00 2001 From: Davi Mello Date: Wed, 17 Jul 2024 09:52:43 +0100 Subject: [PATCH 1/3] ADD GH Pages --- .github/workflows/static.yml | 58 ++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 .github/workflows/static.yml diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml new file mode 100644 index 0000000..ab11ea5 --- /dev/null +++ b/.github/workflows/static.yml @@ -0,0 +1,58 @@ +# Simple workflow for deploying static content to GitHub Pages +name: Deploy static content to Pages + +on: + # Runs on pushes targeting the default branch + push: + branches: ["main"] + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages +permissions: + contents: read + pages: write + id-token: write + +# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. +# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. +concurrency: + group: "pages" + cancel-in-progress: false + +jobs: + # Single deploy job since we're just deploying + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up Node + uses: actions/setup-node@v4 + with: + node-version: 20 + cache: 'yarn' # You can choose npm|yarn|pnpm + + - name: Install dependencies + run: yarn install # If you use npm, you would run: npm ci + + - name: Build + run: yarn build + env: + NODE_ENV: production + + - name: Setup Pages + uses: actions/configure-pages@v5 + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + with: + # Upload entire repository + path: './dist' + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 From f12179b5919b4e05c92d4f495f275b9c32e3c679 Mon Sep 17 00:00:00 2001 From: Davi Mello Date: Wed, 17 Jul 2024 09:54:24 +0100 Subject: [PATCH 2/3] Update static.yml --- .github/workflows/static.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml index ab11ea5..9d0eae3 100644 --- a/.github/workflows/static.yml +++ b/.github/workflows/static.yml @@ -4,7 +4,9 @@ name: Deploy static content to Pages on: # Runs on pushes targeting the default branch push: - branches: ["main"] + branches: + - main + - gh-pages-ci # Allows you to run this workflow manually from the Actions tab workflow_dispatch: From 57eb09fed6f4316932c1fe392a361c220b928041 Mon Sep 17 00:00:00 2001 From: Davi Mello Date: Wed, 17 Jul 2024 09:55:42 +0100 Subject: [PATCH 3/3] Update static.yml --- .github/workflows/static.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml index 9d0eae3..d3bced3 100644 --- a/.github/workflows/static.yml +++ b/.github/workflows/static.yml @@ -4,9 +4,7 @@ name: Deploy static content to Pages on: # Runs on pushes targeting the default branch push: - branches: - - main - - gh-pages-ci + branches: ["main", "gh-pages-ci"] # Allows you to run this workflow manually from the Actions tab workflow_dispatch: