Skip to content

Commit

Permalink
chore: modified github actions files
Browse files Browse the repository at this point in the history
  • Loading branch information
Bobinstein committed Mar 7, 2024
1 parent 4f9ef16 commit 9ad0b1a
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 21 deletions.
45 changes: 24 additions & 21 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
@@ -1,32 +1,35 @@
name: Build and Deploy
name: Production Deploy

on:
push:
branches:
- staging
- main

jobs:
build-and-deploy:
prod-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Node.js
- uses: actions/checkout@v2

- name: Setup Node.js environment
uses: actions/setup-node@v2
with:
node-version: 16
- name: Configure Git
node-version: "16"

- name: Install Yarn
run: npm install -g yarn

- name: Build Docs Portal
run: |
git config --global user.name "GitHub Actions"
git config --global user.email "[email protected]"
- name: Install dependencies
working-directory: ./docs
run: yarn install
- name: Build
working-directory: ./docs
run: yarn build-gh
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
cd docs
yarn install --frozen-lockfile
yarn build
cd ..
- name: Deploy to Firebase
uses: FirebaseExtended/action-hosting-deploy@v0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/src/.vuepress/dist
publish_branch: gh-pages
repoToken: "${{ secrets.GITHUB_TOKEN }}"
firebaseServiceAccount: "${{ secrets.FIREBASE_SERVICE_ACCOUNT_PUBLIC_SITE }}"
channelId: live
entryPoint: docs/src/.vuepress/dist
32 changes: 32 additions & 0 deletions .github/workflows/staging.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Build and Deploy Staging
on:
push:
branches:
- staging

jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: 16
- name: Configure Git
run: |
git config --global user.name "GitHub Actions"
git config --global user.email "[email protected]"
- name: Install dependencies
working-directory: ./docs
run: yarn install
- name: Build
working-directory: ./docs
run: yarn build-gh
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/src/.vuepress/dist
publish_branch: gh-pages

0 comments on commit 9ad0b1a

Please sign in to comment.