Set up auto deploy #241
This file contains 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: Lint | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
lint: | |
name: Lint | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: "lts/*" | |
cache: "npm" | |
- run: npm ci --legacy-peer-deps | |
env: | |
PACKAGES_PAT: ${{ secrets.PACKAGES_PAT }} | |
- run: npm run lint | |
- name: Install Deploy SSH Key | |
uses: shimataro/ssh-key-action@v2 | |
with: | |
key: ${{ secrets.JANEIRL_SSH_DEPLOY_KEY }} | |
name: janeirl | |
config: ${{ secrets.JANEIRL_SSH_DEPLOY_CONFIG }} | |
if_key_exists: fail | |
- name: Deploy | |
if: ${{ github.ref == 'refs/heads/main' }} | |
env: | |
SSH_DEPLOY_KEY: ${{ secrets.JANEIRL_SSH_DEPLOY_KEY }} | |
run: | | |
git remote add janeirl [email protected]:JaneIRL/hackuta2023-site.git | |
git push janeirl |