mirror of
https://github.com/tcgdex/compiler.git
synced 2025-04-22 10:42:09 +00:00
Made github actions not run everything on pulls
Signed-off-by: Avior <florian.bouillon@delta-wings.net>
This commit is contained in:
parent
81f765f2a9
commit
db86629f03
14
.github/workflows/node.js.yml
vendored
14
.github/workflows/node.js.yml
vendored
@ -5,10 +5,7 @@ name: Compile & Push
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
pull_request:
|
pull_request:
|
||||||
workflow_dispatch:
|
|
||||||
repository_dispatch:
|
repository_dispatch:
|
||||||
types:
|
types:
|
||||||
- webhook
|
- webhook
|
||||||
@ -22,7 +19,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
|
|
||||||
|
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
repository: tcgdex/cards-database
|
repository: tcgdex/cards-database
|
||||||
@ -34,7 +31,7 @@ jobs:
|
|||||||
repository: tcgdex/distribution
|
repository: tcgdex/distribution
|
||||||
path: ./dist
|
path: ./dist
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
|
|
||||||
- name: Setup NodeJS
|
- name: Setup NodeJS
|
||||||
uses: actions/setup-node@v2
|
uses: actions/setup-node@v2
|
||||||
with:
|
with:
|
||||||
@ -43,13 +40,14 @@ jobs:
|
|||||||
- name: Compile Database
|
- name: Compile Database
|
||||||
working-directory: ./db
|
working-directory: ./db
|
||||||
run: yarn && yarn compile
|
run: 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: Commit Changes
|
- name: Commit Changes
|
||||||
working-directory: ./dist
|
working-directory: ./dist
|
||||||
|
if: ${{ (github.event_name == 'push' && github.ref == 'refs/head/master') || github.event_name == 'repository_dispatch' }}
|
||||||
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]"
|
||||||
@ -58,13 +56,15 @@ jobs:
|
|||||||
|
|
||||||
- name: Push changes
|
- name: Push changes
|
||||||
uses: ad-m/github-push-action@master
|
uses: ad-m/github-push-action@master
|
||||||
|
if: ${{ (github.event_name == 'push' && github.ref == 'refs/head/master') || github.event_name == 'repository_dispatch' }}
|
||||||
with:
|
with:
|
||||||
github_token: ${{ secrets.PUSH_TOKEN }}
|
github_token: ${{ secrets.PUSH_TOKEN }}
|
||||||
directory: ./dist
|
directory: ./dist
|
||||||
repository: tcgdex/distribution
|
repository: tcgdex/distribution
|
||||||
|
|
||||||
- name: Upload
|
- name: Upload
|
||||||
run: yarn upload
|
run: yarn upload
|
||||||
|
if: ${{ (github.event_name == 'push' && github.ref == 'refs/head/master') || github.event_name == 'repository_dispatch' }}
|
||||||
env:
|
env:
|
||||||
UPLOAD_REMOTE: ${{ secrets.UPLOAD_REMOTE }}
|
UPLOAD_REMOTE: ${{ secrets.UPLOAD_REMOTE }}
|
||||||
UPLOAD_DIST: ${{ secrets.UPLOAD_DIST }}
|
UPLOAD_DIST: ${{ secrets.UPLOAD_DIST }}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user