Use same path as Bonjourr stored data #126
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: | |
branches: | |
- main | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
env: | |
UNSPLASH: ${{ secrets.UNSPLASH }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: pnpm/action-setup@v3 | |
with: | |
version: latest | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: latest | |
cache: 'pnpm' | |
- name: Init submodules | |
run: git submodule update --init | |
- name: Install dependencies | |
run: | | |
pnpm install | |
pnpm --filter weather install | |
- name: Create .dev.vars file | |
run: echo "UNSPLASH=${UNSPLASH}" > ./services/.dev.vars | |
- name: Run tests | |
run: pnpm run test | |
deploy: | |
needs: test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: pnpm/action-setup@v3 | |
with: | |
version: latest | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: latest | |
cache: 'pnpm' | |
- name: Init submodules | |
run: git submodule update --init | |
- name: Deploy Services | |
uses: cloudflare/wrangler-action@v3 | |
with: | |
workingDirectory: 'services' | |
apiToken: ${{ secrets.CF_API_TOKEN }} | |
accountId: ${{ secrets.CF_MAIN_ACCOUNT_ID }} | |
- name: Deploy Weather | |
uses: cloudflare/wrangler-action@v3 | |
with: | |
workingDirectory: 'weather' | |
apiToken: ${{ secrets.CF_API_TOKEN }} | |
accountId: ${{ secrets.CF_MAIN_ACCOUNT_ID }} |