Correctly added token for running commands #20
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: CI | |
on: [push] | |
jobs: | |
deploy: | |
name: Deploy to server | |
runs-on: self-hosted | |
steps: | |
- name: Pull and build | |
run: | | |
cd ~/barbarian-bot/ | |
git fetch "https://${GITHUB_ACTOR}:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" | |
git checkout master | |
git pull "https://${GITHUB_ACTOR}:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" | |
npm install | |
npm run build | |
pm2 restart barbarian-bot | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |