forked from vikunja/frontend
Compare commits
3 Commits
ccf92e3844
...
bf99242a2e
Author | SHA1 | Date |
---|---|---|
WofWca | bf99242a2e | |
WofWca | a9af9080c0 | |
WofWca | 0cba861ee7 |
|
@ -1,6 +1,6 @@
|
|||
# How the file was made: template used: GitHub's suggested "deploy Nuxt app to GitHub pages"
|
||||
# Since it's a Vite project, better refer to https://vitejs.dev/guide/static-deploy.html#github-pages
|
||||
name: Deploy Nuxt site to Pages
|
||||
name: Deploy and release
|
||||
|
||||
on:
|
||||
# Runs on pushes targeting the default branch
|
||||
|
@ -12,7 +12,8 @@ on:
|
|||
|
||||
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
|
||||
permissions:
|
||||
contents: read
|
||||
# Need `contents: write` to make a release.
|
||||
contents: write
|
||||
pages: write
|
||||
id-token: write
|
||||
|
||||
|
@ -23,8 +24,45 @@ concurrency:
|
|||
cancel-in-progress: false
|
||||
|
||||
jobs:
|
||||
# Build job
|
||||
build:
|
||||
release-webxdc:
|
||||
# Only make a release on tags
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
# TODO refactor: steps are duplicated for both jobs. I think
|
||||
# YAML can help here.
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
# https://pnpm.io/continuous-integration
|
||||
- name: Set up pnpm
|
||||
uses: pnpm/action-setup@v2
|
||||
with:
|
||||
version: 7
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: "16"
|
||||
cache: "pnpm"
|
||||
- name: Install dependencies
|
||||
run: pnpm install
|
||||
|
||||
- name: Build
|
||||
run: pnpm run build-webxdc
|
||||
- name: Release
|
||||
uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
# Release every commit
|
||||
tag_name: ${{ github.sha }}
|
||||
# prerelease: ${{ contains(github.event.ref, '-beta') }}
|
||||
prerelease: true
|
||||
fail_on_unmatched_files: true
|
||||
files: dist/*.xdc
|
||||
|
||||
# Deploy to GitHub Pages.
|
||||
deploy-gh-pages:
|
||||
environment:
|
||||
name: github-pages
|
||||
url: ${{ steps.deployment.outputs.page_url }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
|
@ -39,10 +77,11 @@ jobs:
|
|||
with:
|
||||
node-version: "16"
|
||||
cache: "pnpm"
|
||||
- name: Setup Pages
|
||||
uses: actions/configure-pages@v3
|
||||
- name: Install dependencies
|
||||
run: pnpm install
|
||||
|
||||
- name: Setup Pages
|
||||
uses: actions/configure-pages@v3
|
||||
- name: Build
|
||||
env:
|
||||
REPO_OWNER_AND_NAME: ${{ github.repository }}
|
||||
|
@ -53,15 +92,6 @@ jobs:
|
|||
uses: actions/upload-pages-artifact@v1
|
||||
with:
|
||||
path: ./dist
|
||||
|
||||
# Deployment job
|
||||
deploy:
|
||||
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@v1
|
Loading…
Reference in New Issue