diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 07addb4..3366ae2 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -9,6 +9,8 @@ jobs: VM_CONTENTFUL_SPACE: ${{ secrets.VM_CONTENTFUL_SPACE }} VM_CONTENTFUL_ACCESS_TOKEN: ${{ secrets.VM_CONTENTFUL_ACCESS_TOKEN }} VM_CONTENTFUL_ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'production' || 'staging' }} + outputs: + ENVIRONMENT: ${{ github.ref == 'refs/heads/master' && 'production' || 'staging' }} steps: - uses: actions/checkout@v4 @@ -24,7 +26,7 @@ jobs: - name: Archive artifacts uses: actions/upload-artifact@v4 with: - name: build-output-${{ github.ref_name }} + name: build-output-${{ env.ENVIRONMENT }} path: | dist @@ -40,7 +42,7 @@ jobs: uses: actions/download-artifact@v4 with: path: dist - name: build-output-${{ github.ref_name }} + name: build-output-${{ needs.build.outputs.ENVIRONMENT }} - uses: FirebaseExtended/action-hosting-deploy@v0 with: @@ -61,7 +63,7 @@ jobs: uses: actions/download-artifact@v4 with: path: dist - name: build-output-${{ github.ref_name }} + name: build-output-${{ needs.build.outputs.ENVIRONMENT }} - uses: FirebaseExtended/action-hosting-deploy@v0 with: @@ -82,7 +84,7 @@ jobs: uses: actions/download-artifact@v4 with: path: dist - name: build-output-${{ github.ref_name }} + name: build-output-${{ needs.build.outputs.ENVIRONMENT }} - uses: FirebaseExtended/action-hosting-deploy@v0 with: