name: main on: [push] jobs: test: runs-on: ubuntu-latest steps: - run: sudo apt-get install gifsicle graphicsmagick - uses: actions/checkout@v1 - uses: actions/setup-node@v1.4.2 with: node-version: 14 - uses: bahmutov/npm-install@v1.4.1 - run: yarn type - run: yarn lint - run: yarn test --ci - run: yarn build:action test-benchmark: runs-on: ubuntu-latest steps: - run: sudo apt-get install gifsicle graphicsmagick - uses: actions/checkout@v1 - uses: actions/setup-node@v1.4.2 with: node-version: 14 - uses: bahmutov/npm-install@v1.4.1 - run: ( cd packages/compute ; yarn benchmark ) - run: ( cd packages/gif-creator ; yarn benchmark ) test-action: runs-on: ubuntu-latest steps: - run: mkdir dist - name: generate-snake-game-from-github-contribution-grid id: snake-gif uses: Platane/snk@master with: github_user_name: platane gif_out_path: dist/github-contribution-grid-snake.gif - name: ensure the generated file exists run: | ls -l ${{ steps.snake-gif.outputs.gif_out_path }} test -f ${{ steps.snake-gif.outputs.gif_out_path }} - uses: actions/upload-artifact@v2 with: name: output path: ${{ steps.snake-gif.outputs.gif_out_path }} - uses: crazy-max/ghaction-github-pages@v2.1.1 with: target_branch: output build_dir: dist env: GITHUB_TOKEN: ${{ secrets.MY_GITHUB_TOKEN_GH_PAGES }} deploy-ghpages: runs-on: ubuntu-latest steps: - uses: actions/checkout@v1 - uses: actions/setup-node@v1.4.2 with: node-version: 14 - uses: bahmutov/npm-install@v1.4.1 - run: yarn build:demo env: BASE_PATHNAME: "snk" - uses: crazy-max/ghaction-github-pages@v2.1.1 if: success() && github.ref == 'refs/heads/master' with: target_branch: gh-pages build_dir: packages/demo/dist env: GITHUB_TOKEN: ${{ secrets.MY_GITHUB_TOKEN_GH_PAGES }}