add workflow dispatch so we can trigger deploy manually #15
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Telos TestNet - Deploy Production | ||
on: | ||
push: | ||
branches: | ||
- develop | ||
- feature/deploy-with-github-actions | ||
workflow_dispatch | ||
env: | ||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
SLS_ORG_TOKEN: ${{secrets.SLS_ORG_TOKEN}} | ||
chainId: ${{ vars.CHAIN_ID }} | ||
sendGridKey: ${{ secrets.SENDGRID_KEY }} | ||
twilioAccountSid: ${{ secrets.TWILIO_ACCOUNT_SID }} | ||
twilioAuthToken: ${{ secrets.TWILIO_AUTH_TOKEN }} | ||
eosHistoryEndpoint: ${{ vars.HISTORY_ENDPOINT }} | ||
eosHttpEndpoint: ${{ vars.HTTP_ENDPOINT }} | ||
authVerifier: TABLE | ||
authContract: logintester1 | ||
authRetries: 5 | ||
startAuthTimeout: 1000 | ||
minAuthTimeout: 400 | ||
authCodeMinutesTTL: 5 | ||
accessTokenMinutesTTL: 1440 | ||
refreshTokenMinutesTTL: 11520 | ||
sentryDsn: ${{secrets.SENTRY_DSN}} | ||
jobs: | ||
deploy: | ||
name: deploy | ||
environment: telosTestNet | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node-version: [16.x] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- name: Configure AWS credentials | ||
uses: aws-actions/configure-aws-credentials@v1 | ||
with: | ||
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
aws-region: us-east-1 | ||
- run: npm ci | ||
- name: serverless deploy | ||
uses: serverless/github-action@v3.1 | ||
with: | ||
args: deploy --stage telosTestNet --region eu-central-1 |