Initialized Astro template project
This commit is contained in:
45
.gitea/workflows/deploy.yml
Normal file
45
.gitea/workflows/deploy.yml
Normal file
@@ -0,0 +1,45 @@
|
||||
name: Deploy
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: ["**"]
|
||||
delete:
|
||||
|
||||
env:
|
||||
PANGOLIN_API_URL: ${{ secrets.PANGOLIN_API_URL }}
|
||||
PANGOLIN_API_KEY: ${{ secrets.PANGOLIN_API_KEY }}
|
||||
PANGOLIN_ORG_ID: ${{ secrets.PANGOLIN_ORG_ID }}
|
||||
PANGOLIN_DOMAIN_ID: ${{ secrets.PANGOLIN_DOMAIN_ID }}
|
||||
PANGOLIN_SITE_ID: ${{ secrets.PANGOLIN_SITE_ID }}
|
||||
PANGOLIN_TARGET_IP: ${{ secrets.PANGOLIN_TARGET_IP }}
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
if: github.event_name == 'push'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: https://git.zyrrus.dev/eighty-six/node-deploy-action/deploy@v2
|
||||
with:
|
||||
app-name: ${{ vars.APP_NAME }}
|
||||
branch: ${{ github.ref_name }}
|
||||
internal-port: 4321
|
||||
env-vars: |
|
||||
MAILGUN_API_KEY=${{ secrets.MAILGUN_API_KEY }}
|
||||
MAILGUN_DOMAIN=${{ secrets.MAILGUN_DOMAIN }}
|
||||
CONTACT_TO=${{ secrets.CONTACT_TO }}
|
||||
MAILGUN_FROM=${{ secrets.MAILGUN_FROM }}
|
||||
|
||||
cleanup-preview:
|
||||
if: github.event_name == 'delete' && github.event.ref_type == 'branch'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
ref: main
|
||||
|
||||
- uses: https://git.zyrrus.dev/eighty-six/node-deploy-action/cleanup@v2
|
||||
with:
|
||||
app-name: ${{ vars.APP_NAME }}
|
||||
branch: ${{ github.event.ref }}
|
||||
Reference in New Issue
Block a user