Access prod env #118
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: Build Status | |
| on: | |
| push: | |
| branches: [ master ] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| environment: Production | |
| strategy: | |
| matrix: | |
| node-version: [22.x] | |
| # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Setup Tailscale | |
| uses: tailscale/github-action@v3 | |
| with: | |
| oauth-client-id: ${{ secrets.TAILSCALE_OAUTH_CLIENT_ID }} | |
| oauth-secret: ${{ secrets.TAILSCALE_OAUTH_SECRET }} | |
| tags: tag:ci | |
| - name: Build Docker image | |
| uses: docker/build-push-action@v4 | |
| with: | |
| context: . | |
| push: false | |
| load: true | |
| tags: relisten2.tail09dbf.ts.net:32000/relistennet/relisten-web:latest | |
| - name: Push to registry over Tailscale network | |
| run: | | |
| docker push relisten2.tail09dbf.ts.net:32000/relistennet/relisten-web:latest | |
| - name: Install kubectl | |
| uses: azure/setup-kubectl@v3 | |
| - name: Restart Kubernetes deployment | |
| run: | | |
| kubectl --server=https://relisten2.tail09dbf.ts.net:6443 \ | |
| --insecure-skip-tls-verify=true \ | |
| --token=${{ secrets.KUBE_API_TOKEN }} \ | |
| rollout restart deployment relisten-web |