mirror of
https://github.com/tcgdex/compiler.git
synced 2025-04-22 10:42:09 +00:00
Setup Github Actions (#4)
This commit is contained in:
parent
8d250743ee
commit
ed46262d44
29
.github/workflows/node.js.yml
vendored
29
.github/workflows/node.js.yml
vendored
@ -5,7 +5,7 @@ name: Compile & Push
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ master ]
|
branches: [ master, Aviortheking-patch-1 ]
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
repository_dispatch:
|
repository_dispatch:
|
||||||
types:
|
types:
|
||||||
@ -17,6 +17,9 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
submodules: true
|
||||||
|
persist-credentials: false
|
||||||
|
|
||||||
- name: Setup NodeJS
|
- name: Setup NodeJS
|
||||||
uses: actions/setup-node@v2
|
uses: actions/setup-node@v2
|
||||||
@ -24,33 +27,35 @@ jobs:
|
|||||||
node-version: '14.x'
|
node-version: '14.x'
|
||||||
|
|
||||||
- name: Pull Distribution
|
- name: Pull Distribution
|
||||||
working-directory: ./db
|
working-directory: ./dist
|
||||||
run: git pull
|
run: git pull
|
||||||
|
|
||||||
- name: Compile Database
|
- name: Compile Database
|
||||||
working-directory: ./db
|
working-directory: ./db
|
||||||
run: git pull && yarn && cat package.json && yarn compile
|
run: git pull && yarn && yarn compile
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
working-directory: ./
|
working-directory: ./
|
||||||
run: yarn && yarn start && TCGDEX_COMPILER_LANG=fr yarn start
|
run: yarn && yarn start && TCGDEX_COMPILER_LANG=fr yarn start
|
||||||
|
|
||||||
- name: Upload
|
|
||||||
run: yarn upload
|
|
||||||
|
|
||||||
- name: Commit Changes
|
- name: Commit Changes
|
||||||
working-directory: ./dist
|
working-directory: ./dist
|
||||||
run: |
|
run: |
|
||||||
git config --local user.email "bot@tcgdex.net"
|
git config --local user.email "bot@tcgdex.net"
|
||||||
git config --local user.name "TCGdex [bot]"
|
git config --local user.name "TCGdex [bot]"
|
||||||
git commit -m "Updated Database" -a
|
git commit -m "Updated Database" -a
|
||||||
|
|
||||||
|
- name: Push changes
|
||||||
|
uses: ad-m/github-push-action@master
|
||||||
|
with:
|
||||||
|
github_token: ${{ secrets.PUSH_TOKEN }}
|
||||||
|
directory: ./dist
|
||||||
|
repository: tcgdex/distribution
|
||||||
|
|
||||||
|
- name: Upload
|
||||||
|
run: yarn upload
|
||||||
env:
|
env:
|
||||||
UPLOAD_REMOTE: ${{ secrets.UPLOAD_REMOTE }}
|
UPLOAD_REMOTE: ${{ secrets.UPLOAD_REMOTE }}
|
||||||
UPLOAD_DIST: ${{ secrets.UPLOAD_DIST }}
|
UPLOAD_DIST: ${{ secrets.UPLOAD_DIST }}
|
||||||
UPLOAD_USERNAME: ${{ secrets.UPLOAD_USERNAME }}
|
UPLOAD_USERNAME: ${{ secrets.UPLOAD_USERNAME }}
|
||||||
UPLOAD_PASSWORD: ${{ secrets.UPLOAD_PASSWORD }}
|
UPLOAD_PASSWORD: ${{ secrets.UPLOAD_PASSWORD }}
|
||||||
- name: Push changes
|
|
||||||
uses: ad-m/github-push-action@master
|
|
||||||
with:
|
|
||||||
github_token: ${{ secrets.UPLOAD_TOKEN }}
|
|
||||||
directory: './dist'
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user