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

Make actions actually do something useful again #221

Closed
Closed
Show file tree
Hide file tree
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
25 changes: 11 additions & 14 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build/Test/Deploy
name: Build
on:
push:
branches-ignore:
Expand All @@ -7,26 +7,23 @@ on:
pull_request:
jobs:
build:
name: Build and Deploy
name: Build and Upload
runs-on: ubuntu-latest
steps:
- uses: actions/setup-node@v2-beta
with:
node-version: '12'
- name: Checkout Repository
uses: actions/checkout@v2
with:
fetch-depth: '0'
persist-credentials: false
submodules: 'recursive'
- name: Install
run: npm install
- name: Setup Node
uses: actions/setup-node@v2-beta
with:
node-version: '12'
- name: Build
run: npm run build
- name: Deploy
uses: JamesIves/[email protected]
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main'}}
run: npm install && npm run build
- name: Upload Build
uses: actions/upload-pages-artifact@v3
with:
BRANCH: gh-pages
FOLDER: docs
CLEAN: true
path: docs

34 changes: 34 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Build and Deploy
on:
workflow_dispatch:
jobs:
build:
name: Build and Deploy
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
with:
fetch-depth: '0'
persist-credentials: false
submodules: 'recursive'
- name: Build
uses: actions/setup-node@v2-beta
with:
node-version: '12'
run: npm install && npm run build
deploy:
environment:
name: Deploy
url: ${{ steps.deployment.outputs.page_url }}
permissions:
contents: read
pages: write
id-token: write
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4