From f68328a13740cf14d83c874db8f7d01d18f5bdc6 Mon Sep 17 00:00:00 2001 From: masarakki Date: Sun, 16 Jul 2023 03:54:31 +0900 Subject: [PATCH] add-deploy-task --- .github/workflows/deploy.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/deploy.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..f834518 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,27 @@ +name: deploy +on: + push: + branches: + - master +jobs: + deploy: + 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