Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

Commit

Permalink
Merge pull request #17 from ror-community/staging
Browse files Browse the repository at this point in the history
Merge staging to prod
  • Loading branch information
lizkrznarich authored Aug 29, 2022
2 parents 0bbfa4e + 18dae36 commit ad1020f
Show file tree
Hide file tree
Showing 21 changed files with 429 additions and 314 deletions.
3 changes: 2 additions & 1 deletion .env
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
VUE_APP_GENERATE_ID="http://localhost:5000/generateid"
VUE_APP_GENERATE_ID="https://generateid.dev.ror.org/generateid"
VUE_APP_GEONAMES_URL="https://generateid.dev.ror.org/address"
45 changes: 45 additions & 0 deletions .github/workflows/dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Deploy Dev
on:
push:
branches:
- "dev"
paths-ignore:
- '**/README.md'
- '**/workflows/**'
jobs:
run:
runs-on: ubuntu-latest
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
steps:
- uses: actions/checkout@v2
- name: Install
run: npm ci
- name: Build
run: |
cp src/env.dev.ts src/env.ts;
npm run build
- name: Deploy
uses: reggionick/[email protected]
with:
folder: dist
bucket: ${{ secrets.S3_BUCKET_CURATORFORM_DEV}}
bucket-region: ${{ secrets.S3_BUCKET_REGION }}
dist-id: ${{ secrets.CLOUDFRONT_DISTRIBUTION_ID_CURATORFORM_DEV }}
invalidation: /*
delete-removed: true
- name: Notify Slack
if: always()
uses: edge/simple-slack-notify@master
with:
channel: "#deployment-updates"
color: 'good'
text: "A new version of the <https://leo.dev.ror.org|LEO FORM> is deployed to dev."
failure_text: '${env.GITHUB_WORKFLOW} (${env.GITHUB_RUN_NUMBER}) build failed'
fields: |
[{ "title": "Committed by", "value": "<https://github.com/ror-community/leo-form/commits?author=${{ github.actor }}|${{ github.actor }}>", "short": true },
{ "title": "Commit SHA", "value": "<https://github.com/ror-community/leo-form/commit/${{ steps.extract_variables.outputs.GIT_SHA }}|${{ steps.extract_variables.outputs.GIT_SHA_SHORT }}>", "short": true },
{ "title": "Repository", "value": "<https://github.com/${{ github.repository }}|${{ github.repository }}>", "short": true },
{ "title": "Branch", "value": "<https://github.com/ror-community/leo-form/tree/${{ steps.extract_variables.outputs.BRANCH }}|${{ steps.extract_variables.outputs.BRANCH }}>", "short": true }]
42 changes: 42 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Release
on:
release:
types: [published]
jobs:
run:
runs-on: ubuntu-latest
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
steps:
- uses: actions/checkout@v2
- name: Install
run: npm ci
- name: Build
run: |
cp src/env.prod.ts src/env.ts;
npm run build
- name: Deploy
uses: reggionick/[email protected]
with:
folder: dist
bucket: ${{ secrets.S3_BUCKET_CURATORFORM_PROD}}
bucket-region: ${{ secrets.S3_BUCKET_REGION }}
dist-id: ${{ secrets.CLOUDFRONT_DISTRIBUTION_ID_CURATORFORM_PROD }}
invalidation: /*
delete-removed: true
- name: Notify Slack
if: always()
uses: edge/simple-slack-notify@master
with:
channel: "#deployment-updates"
color: 'good'
text: "A new version of the <https://leo.ror.org|LEO FORM> is deployed to production."
failure_text: '${env.GITHUB_WORKFLOW} (${env.GITHUB_RUN_NUMBER}) build failed'
fields: |
[{ "title": "Commit message", "value": "${{ steps.extract_variables.outputs.MESSAGE }}" },
{ "title": "Committed by", "value": "<https://github.com/${{ github.repository }}/commits?author=${{ github.actor }}|${{ github.actor }}>", "short": true },
{ "title": "Commit SHA", "value": "<https://github.com/${{ github.repository }}/commit/${{ steps.extract_variables.outputs.GIT_SHA }}|${{ steps.extract_variables.outputs.GIT_SHA_SHORT }}>", "short": true },
{ "title": "Repository", "value": "<https://github.com/${{ github.repository }}|${{ github.repository }}>", "short": true },
{ "title": "Branch", "value": "<https://github.com/${{ github.repository }}/tree/${{ steps.extract_variables.outputs.BRANCH }}|${{ steps.extract_variables.outputs.BRANCH }}>", "short": true }]
46 changes: 46 additions & 0 deletions .github/workflows/staging.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Deploy Staging
on:
push:
branches:
- "staging"
paths-ignore:
- '**/README.md'
- '**/workflows/**'
jobs:
run:
runs-on: ubuntu-latest
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
steps:
- uses: actions/checkout@v2
- name: Install
run: npm ci
- name: Build
run: |
cp src/env.staging.ts src/env.ts;
npm run build
- name: Deploy
uses: reggionick/[email protected]
with:
folder: dist
bucket: ${{ secrets.S3_BUCKET_CURATORFORM_STAGING}}
bucket-region: ${{ secrets.S3_BUCKET_REGION }}
dist-id: ${{ secrets.CLOUDFRONT_DISTRIBUTION_ID_CURATORFORM_STAGING }}
invalidation: /*
delete-removed: true
- name: Notify Slack
if: always()
uses: edge/simple-slack-notify@master
with:
channel: "#deployment-updates"
color: 'good'
text: "A new version of the <https://leo.staging.ror.org|LEO FORM> is deployed to staging."
failure_text: '${env.GITHUB_WORKFLOW} (${env.GITHUB_RUN_NUMBER}) build failed'
fields: |
[{ "title": "Commit message", "value": "${{ steps.extract_variables.outputs.MESSAGE }}" },
{ "title": "Committed by", "value": "<https://github.com/${{ github.repository }}/commits?author=${{ github.actor }}|${{ github.actor }}>", "short": true },
{ "title": "Commit SHA", "value": "<https://github.com/${{ github.repository }}/commit/${{ steps.extract_variables.outputs.GIT_SHA }}|${{ steps.extract_variables.outputs.GIT_SHA_SHORT }}>", "short": true },
{ "title": "Repository", "value": "<https://github.com/${{ github.repository }}|${{ github.repository }}>", "short": true },
{ "title": "Branch", "value": "<https://github.com/${{ github.repository }}/tree/${{ steps.extract_variables.outputs.BRANCH }}|${{ steps.extract_variables.outputs.BRANCH }}>", "short": true }]
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ WORKDIR /app
COPY package*.json ./

# install and cache project dependencies
RUN npm install
RUN npm ci

# copy project files and folders to the current working directory (i.e. 'app' folder)
COPY . .
Expand Down
1 change: 0 additions & 1 deletion src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,3 @@
</v-footer>
</v-app>
</template>

Loading

0 comments on commit ad1020f

Please sign in to comment.