Skip to content

Commit

Permalink
use-custom-action
Browse files Browse the repository at this point in the history
  • Loading branch information
masarakki committed Jul 19, 2023
1 parent e6f12ff commit e22cf9b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 30 deletions.
12 changes: 2 additions & 10 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: masarakki/docker-alias@v2
- uses: np-complete/build-book-action@v1
with:
image: vvakame/review:5.8
commands: review-pdfmaker
- uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- run: rm `bundle exec which review-pdfmaker`
- run: bundle exec rake pdf
env:
REVIEW_CONFIG_FILE: config.ebook.yml
config: config.ebook.yml
- uses: actions/upload-artifact@v3
with:
name: book
Expand Down
27 changes: 7 additions & 20 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,14 @@
name: deploy
on:
push:
branches:
- master
pull_request_target:
types: closed
permissions:
id-token: write
contents: read
jobs:
deploy:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: masarakki/docker-alias@v2
with:
image: vvakame/review:5.8
commands: review-pdfmaker
- uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- run: rm `bundle exec which review-pdfmaker`
- run: bundle exec rake pdf
env:
REVIEW_CONFIG_FILE: config.ebook.yml
- uses: aws-actions/configure-aws-credentials@v2
with:
aws-access-key-id: ${{ secrets.BOOK_DEPLOY_ACCESS_KEY }}
aws-secret-access-key: ${{ secrets.BOOK_DEPLOY_SECRET_KEY }}
aws-region: us-west-2
- run: aws s3 cp book.pdf s3://np-complete-books/pdf/C95.pdf --acl public-read
- uses: np-complete/publish-book-action@v1

0 comments on commit e22cf9b

Please sign in to comment.