From 1afb6e510110ffa5b03716d9aae29fac47e822fd Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Sun, 17 Jan 2021 12:35:36 +0000 Subject: [PATCH] Add deploy config --- .github/workflows/ci.yml | 2 +- .github/workflows/deploy.yml | 38 ++++++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/deploy.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1f50edf..0cbd55c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,7 +20,7 @@ jobs: - uses: egordm/gha-yarn-node-cache@v1 - run: yarn install - - run: npm run release + - run: npm run build - name: Archive uses: actions/upload-artifact@v2 diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..c9c50d0 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,38 @@ +name: Deploy + +on: + push: + branches: + - main + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - name: Checkout sources + uses: actions/checkout@v2 + + - uses: actions/setup-node@v2 + with: + node-version: '12' + + - uses: egordm/gha-yarn-node-cache@v1 + + - run: yarn install + - run: npm run release + + - name: Archive + uses: actions/upload-artifact@v2 + with: + name: notes + path: public + + - uses: jakejarvis/s3-sync-action@master + with: + args: --follow-symlinks --delete + env: + AWS_S3_BUCKET: notes.theorangeone.net + AWS_ACCESS_KEY_ID: github + AWS_SECRET_ACCESS_KEY: ${{ secrets.MINIO_SECRET_KEY }} + SOURCE_DIR: public + AWS_S3_ENDPOINT: https://pages.theorangeone.net