Run App #6249
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: Run App | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "30 */2 * * *" # At minute 30 past every 2nd hour | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
env: | |
MEDIUM_FEED_URL: ${{secrets.MEDIUM_FEED_URL}} | |
LINKEDIN_ACCESS_TOKEN: ${{secrets.LINKEDIN_ACCESS_TOKEN}} | |
LINKEDIN_PERSON_ID: ${{secrets.LINKEDIN_PERSON_ID}} | |
TWITTER_CONSUMER_KEY: ${{secrets.TWITTER_CONSUMER_KEY}} | |
TWITTER_CONSUMER_SECRET: ${{secrets.TWITTER_CONSUMER_SECRET}} | |
TWITTER_ACCESS_TOKEN: ${{secrets.TWITTER_ACCESS_TOKEN}} | |
TWITTER_ACCESS_TOKEN_SECRET: ${{secrets.TWITTER_ACCESS_TOKEN_SECRET}} | |
AWS_ACCESS_KEY_ID: ${{secrets.AWS_ACCESS_KEY_ID}} | |
AWS_SECRET_ACCESS_KEY: ${{secrets.AWS_SECRET_ACCESS_KEY}} | |
AWS_REGION: ${{secrets.AWS_REGION}} | |
EMAIL_FROM: ${{secrets.EMAIL_FROM}} | |
EMAIL_RECIPIENTS: ${{secrets.EMAIL_RECIPIENTS}} | |
REPLACE_FEED_ITEM_LINK_DOMAIN: ${{secrets.REPLACE_FEED_ITEM_LINK_DOMAIN}} | |
ENABLED_TARGETS: ${{secrets.ENABLED_TARGETS}} | |
strategy: | |
matrix: | |
node-version: [18.x] | |
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/ | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v2 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: 'npm' | |
- run: npm install | |
- run: npm test | |
- name: Run Notifications | |
run: | | |
touch .env | |
echo export MEDIUM_FEED_URL=${{ env.MEDIUM_FEED_URL }} >> .env | |
echo export LINKEDIN_ACCESS_TOKEN=${{ env.LINKEDIN_ACCESS_TOKEN }} >> .env | |
echo export LINKEDIN_PERSON_ID=${{ env.LINKEDIN_PERSON_ID }} >> .env | |
echo export TWITTER_CONSUMER_KEY=${{ env.TWITTER_CONSUMER_KEY }} >> .env | |
echo export TWITTER_CONSUMER_SECRET=${{ env.TWITTER_CONSUMER_SECRET }} >> .env | |
echo export TWITTER_ACCESS_TOKEN=${{ env.TWITTER_ACCESS_TOKEN }} >> .env | |
echo export TWITTER_ACCESS_TOKEN_SECRET=${{ env.TWITTER_ACCESS_TOKEN_SECRET }} >> .env | |
echo export AWS_ACCESS_KEY_ID=${{env.AWS_ACCESS_KEY_ID}} >> .env | |
echo export AWS_SECRET_ACCESS_KEY=${{env.AWS_SECRET_ACCESS_KEY}} >> .env | |
echo export AWS_REGION=${{env.AWS_REGION}} >> .env | |
echo export EMAIL_FROM=${{env.EMAIL_FROM}} >> .env | |
echo export EMAIL_RECIPIENTS=${{env.EMAIL_RECIPIENTS}} >> .env | |
echo export REPLACE_FEED_ITEM_LINK_DOMAIN=${{env.REPLACE_FEED_ITEM_LINK_DOMAIN}} >> .env | |
echo export ENABLED_TARGETS=${{env.ENABLED_TARGETS}} >> .env | |
npm run broadcast |