unique games, name map #89
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
| name: Build and Publish | |
| on: [push] | |
| jobs: | |
| build: | |
| name: Build and Publish to Server | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| node-version: [20.x] | |
| steps: | |
| - name: Pull Project | |
| uses: actions/checkout@v3.5.2 | |
| - name: install or update deno installation | |
| run: | | |
| export DENO_INSTALL="/home/runner/.deno" | |
| export PATH="${DENO_INSTALL}/bin:${PATH}" | |
| mkdir -p "${DENO_INSTALL}" | |
| deno upgrade || ( | |
| curl -fsSL https://deno.land/x/install/install.sh > "${DENO_INSTALL}/.sh"; | |
| sh "${DENO_INSTALL}/.sh" | |
| ) | |
| echo "DENO_INSTALL=${DENO_INSTALL}" >> $GITHUB_ENV | |
| echo "PATH=${PATH}" >> $GITHUB_ENV | |
| deno upgrade | |
| - name: fetch any uncached dependencies | |
| run: | | |
| deno cache --reload=file: ./main.ts | |
| - name: Compile | |
| run: deno compile -A --output bbn-bot main.ts | |
| - name: Login to GitHub Container Registry | |
| uses: docker/login-action@v2.1.0 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ github.token }} | |
| - name: Build and push | |
| uses: docker/build-push-action@v4 | |
| with: | |
| context: . | |
| push: true | |
| tags: "ghcr.io/mgp6775/bbn-bot:latest" | |
| - name: Deploy | |
| uses: appleboy/ssh-action@master | |
| with: | |
| host: ${{ secrets.HOST }} | |
| username: ${{ secrets.USERNAME }} | |
| key: ${{ secrets.KEY }} | |
| port: ${{ secrets.PORT }} | |
| script: cd bbn/ && docker compose up -d --pull always bot |