iptv-database/.github/workflows/deploy.yml

38 lines
1.1 KiB
YAML
Raw Normal View History

2022-02-11 21:55:50 -05:00
name: deploy
on:
workflow_dispatch:
push:
branches:
- master
jobs:
update:
runs-on: ubuntu-latest
steps:
2023-10-06 22:30:55 -04:00
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
if: ${{ !env.ACT }}
with:
node-version: 18
cache: 'npm'
- name: install dependencies
run: npm install
- name: export data to ./api
run: npm run db:export
- uses: tibdex/github-app-token@v1.8.2
2022-02-11 21:55:50 -05:00
if: ${{ !env.ACT }}
id: create-app-token
with:
app_id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.APP_PRIVATE_KEY }}
- uses: JamesIves/github-pages-deploy-action@4.1.1
2022-02-11 22:29:26 -05:00
if: ${{ !env.ACT && github.ref == 'refs/heads/master' }}
2022-02-11 21:55:50 -05:00
with:
2022-02-11 22:29:26 -05:00
repository-name: iptv-org/api
2022-02-11 21:55:50 -05:00
branch: gh-pages
2022-02-13 22:12:11 -05:00
folder: .api
2022-02-11 21:55:50 -05:00
token: ${{ steps.create-app-token.outputs.token }}
git-config-name: iptv-bot[bot]
git-config-email: 84861620+iptv-bot[bot]@users.noreply.github.com
2022-02-15 01:15:42 -05:00
commit-message: '[Bot] Deploy to iptv-org/api'
2022-02-11 21:55:50 -05:00
clean: false