fix(web): no more cookies, only localstorage. #59
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
on: | |
push: | |
branches: | |
- main | |
paths: | |
- 'apps/web/**' | |
pull_request: | |
branches: | |
- main | |
paths: | |
- 'apps/web/**' | |
permissions: | |
contents: write | |
pull-requests: write | |
packages: write | |
jobs: | |
release-web: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Login to GitHub Container Registry | |
if: github.event_name == 'push' | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Install Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: lts/* | |
- uses: pnpm/action-setup@v2 | |
name: Install pnpm | |
with: | |
version: latest | |
- name: Get pnpm store directory | |
shell: bash | |
run: | | |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV | |
- uses: actions/cache@v3 | |
name: Setup pnpm cache | |
with: | |
path: ${{ env.STORE_PATH }} | |
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | |
restore-keys: | | |
${{ runner.os }}-pnpm-store- | |
- name: Install dependencies | |
run: pnpm install --filter=web | |
- name: Build Svelte | |
run: pnpm run build --filter=web | |
- name: Upload to GitHub Container Registry | |
uses: docker/build-push-action@v4 | |
with: | |
push: ${{ github.event_name == 'push' }} | |
tags: ghcr.io/${{ github.repository_owner }}/web:nightly | |
file: web.Dockerfile | |
context: . | |
labels: | | |
org.opencontainers.image.title=BeatForge Web | |
org.opencontainers.image.description=The frontend for BeatForge | |
org.opencontainers.image.url=https://beatforge.net | |
- name: Deploy to Staging | |
if: github.event_name == 'push' | |
uses: appleboy/[email protected] | |
with: | |
host: ${{ secrets.HOST }} | |
username: ${{ secrets.USERNAME }} | |
password: ${{ secrets.PASSWORD }} | |
port: ${{ secrets.PORT }} | |
script: | | |
docker run -v /var/run/docker.sock:/var/run/docker.sock containrrr/watchtower --run-once |