diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 636e819..00dfbe1 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -13,30 +13,40 @@ on: jobs: build: - runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - name: Compile & Upload + + - name: Setup NodeJS uses: actions/setup-node@v2 with: - node-version: 14.x - - run: git pull --recurse-submodules=yes - - run: yarn db:compile - - run: TCGDEX_COMPILER_LANG=en yarn start - - run: TCGDEX_COMPILER_LANG=fr yarn start - - run: yarn upload - - run: git config --local user.email "bot@tcgdex.net" - - run: git config --local user.name "TCGdex [bot]" - - run: cd dist && git commit -m "Updated Database" -a && cd ../ + node-version: '14.x' + + - name: Pull submodules + run: git pull --recurse-submodules=yes + + - name: Compile Database + run: yarn db:compile + + - name: Build + run: yarn start && TCGDEX_COMPILER_LANG=fr yarn start + + - name: Upload + run: yarn upload + + - name: Commit Changes + run: | + git config --local user.email "bot@tcgdex.net" + git config --local user.name "TCGdex [bot]" + cd dist && git commit -m "Updated Database" -a && cd ../ env: UPLOAD_REMOTE: ${{ secrets.UPLOAD_REMOTE }} UPLOAD_DIST: ${{ secrets.UPLOAD_DIST }} UPLOAD_USERNAME: ${{ secrets.UPLOAD_USERNAME }} UPLOAD_PASSWORD: ${{ secrets.UPLOAD_PASSWORD }} - name: Push changes - - uses: ad-m/github-push-action@master - - with: + uses: ad-m/github-push-action@master + with: github_token: ${{ secrets.UPLOAD_TOKEN }} directory: './dist'