docs: update new donate approach #13
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # This workflow will do a clean install of node dependencies, cache/restore them, build the source code and run tests across different versions of node | |
| # For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions | |
| name: Surge CI | |
| on: | |
| push: | |
| branches: [ master ] | |
| pull_request: | |
| branches: [ master ] | |
| jobs: | |
| build-surge: | |
| name: Test & Build for Surge | |
| runs-on: ubuntu-latest | |
| env: | |
| REACT_APP_DOMAIN: ifs49f-poker.surge.sh | |
| REACT_APP_SOCKET_SERVER_URL: 'https://afternoon-gorge-59515.herokuapp.com/' | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 14 | |
| cache: yarn | |
| - run: yarn install --frozen-lockfile | |
| - run: yarn test | |
| - run: yarn build | |
| - uses: actions/upload-artifact@v4 | |
| if: ${{ github.ref == 'refs/heads/master' }} | |
| with: | |
| name: dist | |
| path: build | |
| deploy-surge: | |
| needs: build-surge | |
| if: ${{ github.ref == 'refs/heads/master' }} | |
| environment: Surge | |
| name: Deploy to Surge | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: dist | |
| # https://surge.sh/help/adding-a-200-page-for-client-side-routing | |
| - run: cp index.html 200.html | |
| - uses: dswistowski/surge-sh-action@v1.0.1 | |
| with: | |
| domain: ifs49f-poker.surge.sh | |
| login: ${{ secrets.SURGE_LOGIN }} | |
| token: ${{ secrets.SURGE_TOKEN }} |