File tree 2 files changed +40
-26
lines changed
2 files changed +40
-26
lines changed Original file line number Diff line number Diff line change @@ -16,17 +16,28 @@ permissions:
16
16
# Needed in order to be able to comment on the pull request.
17
17
pull-requests : write
18
18
19
+ env :
20
+ PREVIEW_PROJECT : ng-dev-previews
21
+ PREVIEW_SITE : ng-dev-previews-comp
22
+
19
23
jobs :
20
24
deploy-dev-app :
21
25
runs-on : ubuntu-latest
22
26
if : ${{ github.event.workflow_run.conclusion == 'success' }}
23
27
steps :
24
28
- uses : actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579 # renovate: tag=v2.0.0
29
+
30
+ - name : Configure Firebase deploy target
31
+ run : |
32
+ # We can use `npx` as the Firebase deploy actions uses it too.
33
+ npx -y firebase-tools@latest target:clear --project ${{env.PREVIEW_PROJECT}} hosting dev-app
34
+ npx -y firebase-tools@latest target:apply --project ${{env.PREVIEW_PROJECT}} hosting dev-app ${{env.PREVIEW_SITE}}
35
+
25
36
- uses : angular/dev-infra/github-actions/deploy-previews/upload-artifacts-to-firebase@0a49ed85541ecbb28a0e19eefce7a874c1eaab5e
26
37
with :
27
38
github-token : ' ${{secrets.GITHUB_TOKEN}}'
28
39
workflow-artifact-name : ' dev-app'
29
40
firebase-config-dir : ' ./'
30
41
firebase-public-dir : ' ./dist/dev-app-web-pkg'
31
- firebase-project-id : ' ng-comp-dev '
42
+ firebase-project-id : ' ${{env.PREVIEW_PROJECT}} '
32
43
firebase-service-key : ' ${{secrets.FIREBASE_PREVIEW_SERVICE_TOKEN}}'
Original file line number Diff line number Diff line change 1
1
{
2
- "hosting" : {
3
- "public" : " dist/dev-app-web-pkg" ,
4
- "rewrites" : [
5
- {
6
- "source" : " /**/!(*.@(js|ts|html|css|json|svg|png|jpg|jpeg))" ,
7
- "destination" : " /index.html"
8
- }
9
- ],
10
- "headers" : [
11
- {
12
- "source" : " *" ,
13
- "headers" : [
14
- {
15
- "key" : " Cache-Control" ,
16
- "value" : " no-cache"
17
- },
18
- {
19
- "key" : " X-Frame-Options" ,
20
- "value" : " DENY"
21
- }
22
- ]
23
- }
24
- ],
25
- "ignore" : [" firebase.json" ]
26
- }
2
+ "hosting" : [
3
+ {
4
+ "target" : " dev-app" ,
5
+ "public" : " dist/dev-app-web-pkg" ,
6
+ "rewrites" : [
7
+ {
8
+ "source" : " /**/!(*.@(js|ts|html|css|json|svg|png|jpg|jpeg))" ,
9
+ "destination" : " /index.html"
10
+ }
11
+ ],
12
+ "headers" : [
13
+ {
14
+ "source" : " *" ,
15
+ "headers" : [
16
+ {
17
+ "key" : " Cache-Control" ,
18
+ "value" : " no-cache"
19
+ },
20
+ {
21
+ "key" : " X-Frame-Options" ,
22
+ "value" : " DENY"
23
+ }
24
+ ]
25
+ }
26
+ ],
27
+ "ignore" : [" firebase.json" ]
28
+ }
29
+ ]
27
30
}
You can’t perform that action at this time.
0 commit comments