ci: simplify deploy workflow with Alpine container and Gitea checkout
Deploy PR-Helper / deploy (push) Failing after 4m17s
Deploy PR-Helper / deploy (push) Failing after 4m17s
This commit is contained in:
@@ -4,16 +4,28 @@ run-name: ${{ gitea.actor }} deployed PR-Helper
|
|||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [main]
|
branches: [main]
|
||||||
paths-ignore:
|
|
||||||
- '.gitea/workflows/deploy.yml'
|
|
||||||
- 'deploy.sh'
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
deploy:
|
deploy:
|
||||||
runs-on: aliyun
|
runs-on: aliyun
|
||||||
|
container: node:22-alpine
|
||||||
steps:
|
steps:
|
||||||
- name: Install Docker & Compose
|
- name: Install tools
|
||||||
run: |
|
run: |
|
||||||
apt-get update && apt-get install -y docker.io docker-compose-plugin
|
sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
|
||||||
- name: Deploy
|
apk add --no-cache docker-cli docker-cli-compose git
|
||||||
run: cd /root/PR-Helper && bash deploy.sh
|
|
||||||
|
- name: Checkout
|
||||||
|
uses: http://47.121.181.112:3000/wonder/checkout@v4
|
||||||
|
with:
|
||||||
|
github-server-url: http://47.121.181.112:3000
|
||||||
|
|
||||||
|
- name: Write .env
|
||||||
|
env:
|
||||||
|
DEPLOY_ENV: ${{ secrets.DEPLOY_ENV }}
|
||||||
|
run: echo "$DEPLOY_ENV" > .env
|
||||||
|
|
||||||
|
- name: Build & Deploy
|
||||||
|
run: |
|
||||||
|
docker compose build
|
||||||
|
docker compose up -d
|
||||||
|
|||||||
Reference in New Issue
Block a user