many updates ooh ow oof i hope it doesnt break :3 #121
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
#thx atymic bby <3 | |
name: CI-CD | |
on: push | |
jobs: | |
build-js: | |
name: Build Js/Css | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v1 | |
- uses: pnpm/action-setup@v2 | |
with: | |
version: 6.0.2 | |
- name: Build | |
run: | | |
pnpm install | |
pnpm build | |
- name: Tar build files | |
run: tar -czvf assets.tar.gz public/build/ | |
- name: Upload build files | |
uses: actions/upload-artifact@v3 | |
with: | |
name: assets | |
path: assets.tar.gz | |
- name: Upload SSR file | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ssr | |
path: bootstrap/ssr/ssr.mjs | |
# test-php: | |
# name: Test/Lint PHP | |
# runs-on: ubuntu-latest | |
# steps: | |
# - uses: actions/checkout@v1 | |
deploy: | |
name: Deploy to Production | |
runs-on: ubuntu-latest | |
needs: [build-js] # Add test-php when re-enabled | |
steps: | |
- uses: actions/checkout@v1 | |
- name: Download build assets | |
uses: actions/download-artifact@v3 | |
with: | |
name: assets | |
path: public | |
- name: Extract build files | |
run: tar -xzvf public/assets.tar.gz | |
- name: Download SSR file | |
uses: actions/download-artifact@v3 | |
with: | |
name: ssr | |
path: boostrap/ssr | |
- name: Setup PHP | |
uses: shivammathur/setup-php@master | |
with: | |
php-version: 8.1 | |
extensions: mbstring, bcmath | |
- name: Composer install | |
run: composer install | |
- name: Setup Deployer | |
uses: atymic/deployer-php-action@master | |
with: | |
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }} | |
ssh-known-hosts: ${{ secrets.SSH_KNOWN_HOSTS }} | |
- name: Deploy to Prod | |
env: | |
DOT_ENV: ${{ secrets.DOT_ENV }} | |
run: | | |
php vendor/bin/dep launch stage=production -vvv |