fix deploy for GitHub action
This commit is contained in:
@@ -10,16 +10,26 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
submodules: false
|
||||||
|
|
||||||
- run: corepack enable
|
- run: corepack enable
|
||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: "22"
|
node-version: "22"
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: pnpm install
|
run: pnpm install
|
||||||
|
|
||||||
- name: Change content submodule URL
|
- name: Change content submodule URL
|
||||||
run: cd content/ && git remote set-url origin https://github.com/techitwinner/web-content.git && cd ../
|
run: |
|
||||||
|
cd content/
|
||||||
|
git remote set-url origin https://github.com/techitwinner/web-content.git
|
||||||
|
cd ../
|
||||||
|
|
||||||
- name: Fetch contents
|
- name: Fetch contents
|
||||||
run: git submodule update --init --remote
|
run: git submodule update --init --remote
|
||||||
|
|
||||||
- name: Generate static pages
|
- name: Generate static pages
|
||||||
run: pnpm generate
|
run: pnpm generate
|
||||||
env:
|
env:
|
||||||
@@ -28,24 +38,29 @@ 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: Create ZIP artifact
|
|
||||||
run: |
|
- name: Upload build output
|
||||||
zip -r web.zip ./.output/public
|
uses: actions/upload-pages-artifact@v3
|
||||||
- name: Upload ZIP artifact
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
with:
|
||||||
name: web
|
path: .output/public # Nuxt generates static site here
|
||||||
path: web.zip
|
# - name: Create ZIP artifact
|
||||||
- name: Create GitHub Release
|
# run: |
|
||||||
id: release
|
# zip -r web.zip ./.output/public
|
||||||
uses: ncipollo/release-action@v1
|
# - name: Upload ZIP artifact
|
||||||
with:
|
# uses: actions/upload-artifact@v4
|
||||||
tag: ${{ github.sha }}
|
# with:
|
||||||
name: Release ${{ github.sha }}
|
# name: web
|
||||||
body: Automated release for commit ${{ github.sha }}
|
# path: web.zip
|
||||||
draft: false
|
# - name: Create GitHub Release
|
||||||
prerelease: false
|
# id: release
|
||||||
files: web.zip
|
# 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:
|
||||||
needs: build
|
needs: build
|
||||||
|
|||||||
Reference in New Issue
Block a user