Skip to content

more fix

more fix #2

Workflow file for this run

name: Deploy to GitHub pages
on:
push:
branches: [main]
workflow_dispatch:
permissions:
id-token: write
contents: write
pages: write
repository-projects: write
env:
PROJECT_SRC: src/apps/app.internal
APP_SRC: src/apps/app.internal
BUILD_FOLDER: src/apps/app.internal/.output/public
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
branch: 'main'
submodule: false
repository: drolx/ying
token: ${{ github.token }}
path: src
- name: setup bun
uses: oven-sh/setup-bun@v2
with:
bun-version: "latest"
- name: Generate static Nuxt 3 files
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'bun'
- run: |
cd $PROJECT_SRC
bun install
cd $APP_SRC
bun generate
- name: Init new repo in $BUILD_FOLDER and commit generated files
run: |
grep -rnwl "<link rel=\"prefetch\"" $BUILD_FOLDER | xargs sed -i 's$<link rel="prefetch" href="[^"]*\.\(jpg\|png\|webm\|jpeg\|ttg\|svg\|gif\)">$$g'
cd $BUILD_FOLDER
touch .nojekyll
git init
git add -A
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git commit -m 'deploy'
- name: Deploy
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: ${{env.BUILD_FOLDER}}