CD #32
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: CD | |
on: | |
workflow_dispatch: | |
jobs: | |
build: | |
strategy: | |
matrix: | |
os: | |
[ | |
{ name: 'linux', image: 'ubuntu-latest' }, | |
{ name: 'windows', image: 'windows-latest' }, | |
{ name: 'macos', image: 'macos-latest' }, | |
] | |
runs-on: ${{ matrix.os.image }} | |
steps: | |
- name: Github checkout | |
uses: actions/checkout@v4 | |
- name: Read .nvmrc | |
run: echo "NVMRC=$(cat .nvmrc)" >> $GITHUB_OUTPUT | |
id: nvm | |
- name: Create .env file | |
uses: SpicyPizza/[email protected] | |
with: | |
envkey_TURSO_DATABASE_URL: ${{ secrets.TURSO_DATABASE_URL }} | |
envkey_TURSO_AUTH_TOKEN: ${{ secrets.TURSO_AUTH_TOKEN }} | |
envkey_DEFAULT_SUPER_ADMIN_USERNAME: ${{ secrets.DEFAULT_SUPER_ADMIN_USERNAME }} | |
envkey_DEFAULT_SUPER_ADMIN_PASSWORD: ${{ secrets.DEFAULT_SUPER_ADMIN_PASSWORD }} | |
- name: Use Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '${{ steps.nvm.outputs.NVMRC }}' | |
- run: yarn install --frozen-lockfile | |
- name: Publish app | |
env: | |
GITHUB_TOKEN: ${{ secrets.DEPLOY_KEY }} | |
run: npm run publish |