name: Build to gh-pages on: push: branches: - master jobs: deploy: runs-on: ubuntu-latest strategy: matrix: node-version: [14.x] steps: - name: Checkout uses: actions/checkout@v2 - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v1 with: node-version: ${{ matrix.node-version }} - name: Initialize / Install Dependencies run: | mkdir temp_release npm install - name: Build web if: startsWith(github.ref, 'refs/tags/') run: | npm run build -adapter=web cp -r ./dist ./dist_gh_pages cd ./dist zip -r -q ../temp_release/web.zip ./* cd ../ unzip -l ./temp_release/web.zip - name: Build chrome if: startsWith(github.ref, 'refs/tags/') run: | npm run build -adapter=chrome cd ./dist zip -r -q ../temp_release/chrome.zip ./* cd ../ - name: Build utools if: startsWith(github.ref, 'refs/tags/') run: | npm run build -adapter=utools cd ./dist zip -r -q ../temp_release/utools.zip ./* cd ../ - name: Build edge if: startsWith(github.ref, 'refs/tags/') run: | npm run build -adapter=edge cd ./dist zip -r -q ../temp_release/edge.zip ./* cd ../ - name: Build firefox if: startsWith(github.ref, 'refs/tags/') run: | npm run build -adapter=firefox cd ./dist zip -r -q ../temp_release/firefox.zip ./* cd ../ - name: upload build to github uses: softprops/action-gh-release@v1 if: startsWith(github.ref, 'refs/tags/') with: files: | web.zip chrome.zip utools.zip edge.zip firefox.zip - name: Deploy web to gh-pages if: startsWith(github.ref, 'refs/tags/') uses: peaceiris/actions-gh-pages@v3 with: deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }} publish_dir: ./dist_gh_pages