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

Update CI actions and remove use of gh-pages branch #53

Merged
merged 8 commits into from
Aug 8, 2024
Merged
Next Next commit
Update CI actions and remove use of gh-pages branch
1Revenger1 committed Aug 8, 2024
commit 3fbd35246c1b1178e334789793236eea1ab8ae79
52 changes: 34 additions & 18 deletions .github/workflows/build_test_deploy.yml
Original file line number Diff line number Diff line change
@@ -1,36 +1,52 @@
name: Build/Test/Deploy
on:
push:
branches-ignore:
- gh-pages
workflow_dispatch:
pull_request:

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: "pages"
cancel-in-progress: false

jobs:
build:
name: Build and Deploy
runs-on: ubuntu-latest
steps:
- uses: actions/setup-node@v2-beta
with:
node-version: '16'
- name: Checkout Repository
uses: actions/checkout@v2
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: '1'
persist-credentials: false
submodules: 'recursive'
- name: Install
run: npm install
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '22'
cache: 'npm'
cache-dependency-path: ./package.json
- name: Install Dependencies
run: npm ci
- name: Build
run: npm run build
- name: Deploy
uses: JamesIves/[email protected]
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master'}}
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
BRANCH: gh-pages
FOLDER: .vuepress/dist/
CLEAN: true
path: .vuepress/dist/
deploy:
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
lint:
name: Lint
runs-on: ubuntu-latest