diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 487a929..954f139 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -1,21 +1,19 @@ -name: Deploy site -on: +name: Deploy to Firebase Hosting +'on': push: branches: - main jobs: - firebase-deploy: + build_and_deploy: runs-on: ubuntu-latest steps: - - name: Checkout current branch with lfs - uses: actions/checkout@master - - name: Build site - run: | - npm install - npm run build - - name: Deploy html - uses: w9jds/firebase-action@master + - uses: actions/checkout@v2 + - run: npm install && npm run build + - uses: FirebaseExtended/action-hosting-deploy@v0 with: - args: deploy --only hosting:sdf2d-schmelczer-dev --project schmelczer-dev + repoToken: '${{ secrets.GITHUB_TOKEN }}' + firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_SCHMELCZER_DEV }}' + channelId: live + projectId: schmelczer-dev env: - FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }} + FIREBASE_CLI_PREVIEWS: hostingchannels diff --git a/firebase.json b/firebase.json index f627860..5917d4b 100644 --- a/firebase.json +++ b/firebase.json @@ -1,7 +1,11 @@ { "hosting": { "public": "dist", - "ignore": ["firebase.json", "**/.*", "**/node_modules/**"], + "ignore": [ + "firebase.json", + "**/.*", + "**/node_modules/**" + ], "site": "sdf2d-schmelczer-dev", "rewrites": [ {