wip #45
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
# .github/workflows/deploy.yml | |
name: Deploy | |
on: | |
push: | |
branches: | |
- main | |
env: | |
TORCHLIGHT_API_TOKEN: ${{ secrets.TORCHLIGHT_API_TOKEN }} | |
jobs: | |
deploy: | |
name: Deploy | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: 20 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: 8.4 | |
- name: Download `deployer.phar` | |
run: composer global require deployer/deployer --no-interaction --verbose --ansi | |
- name: Get composer global bin-dir path | |
id: composer-bin-dir | |
run: echo "COMPOSER_PATH=$(composer global config bin-dir --absolute)" >> "$GITHUB_ENV" | |
- name: Install Dependencies | |
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist | |
- name: Install Node Dependencies | |
run: npm install | |
- name: Deploy | |
uses: deployphp/action@master | |
with: | |
deployer-binary: ${{ env.COMPOSER_PATH }}/dep | |
private-key: ${{ secrets.PRIVATE_KEY }} | |
known-hosts: ${{ secrets.KNOWN_HOSTS }} | |
dep: deploy |