Skip to content

Commit

Permalink
chore: automate gh deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
rossbulat committed Jun 25, 2024
1 parent e52d845 commit 37396c8
Showing 1 changed file with 44 additions and 2 deletions.
46 changes: 44 additions & 2 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ env:
FONTAWESOME_PACKAGE_TOKEN: ${{ secrets.FONTAWESOME_PACKAGE_TOKEN }}

jobs:
gh-deploy:
merge:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -29,14 +29,56 @@ jobs:
target_branch: gh-deploy
github_token: ${{ secrets.GITHUB_TOKEN }}


build:
runs-on: ubuntu-latest
needs: merge
steps:
- uses: actions/checkout@v4
with:
ref: gh-deploy

- uses: actions/setup-node@v4
with:
node-version: 18
registry-url: https://registry.npmjs.org
cache: 'yarn'

- name: Install
run: yarn install

- name: Build
working-directory: '.'
run: yarn build:pages

- name: Deploy
- name: Update `gh-pages` branch
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: build

- name: Upload Artifact
uses: actions/upload-pages-artifact@v3
with:
name: github-pages
path: build

deploy:
runs-on: ubuntu-latest
needs: build

permissions:
id-token: write
pages: write

environment:
name: github-pages
url: ${{steps.deployment.outputs.page_url}}

steps:
- uses: actions/download-artifact@master
with:
name: github-pages
path: build
- uses: actions/configure-pages@v5
- id: deployment
uses: actions/deploy-pages@main

0 comments on commit 37396c8

Please sign in to comment.