gitea action, try without artifacts
This commit is contained in:
25
.github/workflows/deploy.yml
vendored
25
.github/workflows/deploy.yml
vendored
@@ -6,34 +6,32 @@ jobs:
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: pnpm/action-setup@v4
|
||||
|
||||
# setup Node et pnpm
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20
|
||||
cache: "pnpm"
|
||||
- uses: pnpm/action-setup@v4
|
||||
|
||||
# install et build
|
||||
- run: pnpm install --frozen-lockfile
|
||||
- run: pnpm build
|
||||
- run: tar -czf build.tar.gz .output
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: nuxt-build
|
||||
path: build.tar.gz
|
||||
|
||||
test:
|
||||
runs-on: ubuntu-22.04
|
||||
needs: build
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: pnpm/action-setup@v4
|
||||
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20
|
||||
cache: "pnpm"
|
||||
- uses: pnpm/action-setup@v4
|
||||
|
||||
# install seulement les prod deps, start server
|
||||
- run: pnpm install --frozen-lockfile --prod
|
||||
- uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: nuxt-build
|
||||
- run: tar -xzf build.tar.gz
|
||||
- run: pnpm start &
|
||||
- run: npx wait-on http://localhost:3000
|
||||
- run: curl -f http://localhost:3000 || exit 1
|
||||
@@ -46,12 +44,11 @@ jobs:
|
||||
- /var/docker-web:/var/docker-web
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: install
|
||||
|
||||
- name: Deploy with docker-web
|
||||
run: |
|
||||
APP_DIR=/var/docker-web/apps/${GITHUB_REPOSITORY##*/}
|
||||
mkdir -p $APP_DIR
|
||||
cp -a $(find . -mindepth 1 -maxdepth 1 ! -name '.git' ! -name 'node_modules') "$APP_DIR/"
|
||||
- name: up
|
||||
run: |
|
||||
export COMPOSE_BAKE=false
|
||||
bash /var/docker-web/src/cli.sh up ${GITHUB_REPOSITORY##*/}
|
||||
|
||||
Reference in New Issue
Block a user