diff --git a/.github/workflows/deploy-to-neocities.yml b/.github/workflows/deploy-to-prod.yml similarity index 61% rename from .github/workflows/deploy-to-neocities.yml rename to .github/workflows/deploy-to-prod.yml index 2b8428f..6e307cd 100644 --- a/.github/workflows/deploy-to-neocities.yml +++ b/.github/workflows/deploy-to-prod.yml @@ -1,4 +1,4 @@ -name: Deploy to Neocities +name: Deploy to Production # only run on changes to main on: @@ -9,7 +9,7 @@ on: - main concurrency: # prevent concurrent deploys doing strange things - group: deploy-to-neocities + group: deploy-to-prod cancel-in-progress: true # Default to bash @@ -40,9 +40,20 @@ jobs: run: | npm i @torchlight-api/torchlight-cli npx torchlight - - name: Deploy to Neocities + - name: Deploy HTML to Neocities uses: bcomnes/deploy-to-neocities@v1 with: api_token: ${{ secrets.NEOCITIES_API_TOKEN }} cleanup: true - dist_dir: public \ No newline at end of file + dist_dir: public + - name: Connect to Tailscale + uses: tailscale/github-action@v2 + with: + oauth-client-id: ${{ secrets.TS_API_CLIENT_ID }} + oauth-secret: ${{ secrets.TS_API_CLIENT_SECRET }} + tags: ${{ secrets.TS_TAG }} + - name: Deploy GMI to Agate + run: | + ssh-keyscan -H ${{ secrets.GMI_HOST }} >> ~/.ssh/known_hosts + rsync -avz --delete --exclude='*.html' --exclude='*.css' --exclude='*.js' -e ssh public/ ${{ secrets.GMI_HOST }}:${{ secrets.GMI_CONTENT_PATH }} +