Skip to content

Commit

Permalink
fix-job-need-premission
Browse files Browse the repository at this point in the history
  • Loading branch information
RyosukeDTomita committed Aug 4, 2024
1 parent abce2f6 commit 59cf499
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions .github/workflows/github-pages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,24 @@ on:
push:
# branches:
# - master

workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write
defaults:
run:
shell: bash

concurrency:
group: "pages"
cancel-in-progress: false

# env:
# GITHUB_CONTAINER_REGISTRY_TAG: ryosukedtomita/github-pages-test-docker
# IMAGE_NAME: react-app


jobs:
build:
runs-on: ubuntu-latest
environment:
name: staging
permissions:
contents: read
id-token: write

steps:
- name: Checkout repository
Expand All @@ -51,7 +47,7 @@ jobs:
echo ----[DEBUG]: END----
docker buildx bake --set react-app.args.BUILD_ENV=${environment}
docker compose up -d
docker compose cp react-app:/usr/share/nginx/html build
docker compose cp react-app-container:/usr/share/nginx/html build
# Deploymentsにupload
- name: Upload artifact
Expand All @@ -65,8 +61,12 @@ jobs:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
permissions:
pages: write
contents: read
timeout-minutes: 10
needs: build

steps:
- name: Deploy to GitHub Pages
id: deployment
Expand Down

0 comments on commit 59cf499

Please sign in to comment.