add auto-release and artifact upload thingy
This commit is contained in:
@@ -1,10 +1,10 @@
|
|||||||
# https://github.com/actions/deploy-pages#usage
|
|
||||||
name: Deploy to GitHub Pages
|
name: Deploy to GitHub Pages
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@@ -28,23 +28,33 @@ jobs:
|
|||||||
NUXT_PUBLIC_BASE_URL: ${{ vars.NUXT_PUBLIC_BASE_URL }}
|
NUXT_PUBLIC_BASE_URL: ${{ vars.NUXT_PUBLIC_BASE_URL }}
|
||||||
NUXT_PUBLIC_SITE_AUTHOR: ${{ vars.NUXT_PUBLIC_SITE_AUTHOR }}
|
NUXT_PUBLIC_SITE_AUTHOR: ${{ vars.NUXT_PUBLIC_SITE_AUTHOR }}
|
||||||
NUXT_PUBLIC_BUILD_BASE_URL: ${{ vars.NUXT_PUBLIC_BUILD_BASE_URL }}
|
NUXT_PUBLIC_BUILD_BASE_URL: ${{ vars.NUXT_PUBLIC_BUILD_BASE_URL }}
|
||||||
- name: Upload artifact
|
- name: Create ZIP artifact
|
||||||
uses: actions/upload-pages-artifact@v3
|
run: |
|
||||||
|
zip -r web.zip ./.output/public
|
||||||
|
- name: Upload ZIP artifact
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
path: ./.output/public
|
name: web
|
||||||
# Deployment job
|
path: web.zip
|
||||||
|
- name: Create GitHub Release
|
||||||
|
id: release
|
||||||
|
uses: ncipollo/release-action@v1
|
||||||
|
with:
|
||||||
|
tag: ${{ github.sha }}
|
||||||
|
name: Release ${{ github.sha }}
|
||||||
|
body: Automated release for commit ${{ github.sha }}
|
||||||
|
draft: false
|
||||||
|
prerelease: false
|
||||||
|
files: web.zip
|
||||||
|
|
||||||
deploy:
|
deploy:
|
||||||
# Add a dependency to the build job
|
|
||||||
needs: build
|
needs: build
|
||||||
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
|
|
||||||
permissions:
|
permissions:
|
||||||
pages: write # to deploy to Pages
|
pages: write
|
||||||
id-token: write # to verify the deployment originates from an appropriate source
|
id-token: write
|
||||||
# Deploy to the github_pages environment
|
|
||||||
environment:
|
environment:
|
||||||
name: github-pages
|
name: github-pages
|
||||||
url: ${{ steps.deployment.outputs.page_url }}
|
url: ${{ steps.deployment.outputs.page_url }}
|
||||||
# Specify runner + deployment step
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Deploy to GitHub Pages
|
- name: Deploy to GitHub Pages
|
||||||
|
|||||||
Reference in New Issue
Block a user