name: Website Deployment on: push: branches: - master jobs: deploy-website: name: Deploy Website timeout-minutes: 60 runs-on: ubuntu-latest if: contains(github.event.head_commit.message, '[deploy_website]') || contains(github.ref, 'refs/tags/') steps: - name: Checkout Master uses: actions/checkout@v2 - name: Configure Git Credientials run: | git config --global user.email "${{github.actor}}@users.noreply.github.com" git config --global user.name "${{github.actor}}" echo "machine github.com login ${{github.actor}} password ${{secrets.GITHUB_TOKEN}}" > ~/.netrc - name: Add origin remote and refetch master run: | git remote rm origin git remote add origin "https://github.com/${{github.repository}}" git fetch git checkout master git reset --hard - name: Use Node uses: actions/setup-node@v2 with: node-version: '14.x' - name: Install Dependencies using Yarn run: yarn install --ignore-engines --frozen-lockfile - name: Deploy 🚀 run: yarn deploy:website env: GIT_USER: ${{github.actor}} NEXT_PUBLIC_ALGOLIA_APP_ID: ${{ secrets.ALGOLIA_APP_ID }} NEXT_PUBLIC_ALGOLIA_SEARCH_API_KEY: a5522203ca95675199cc21edf09e6d75 NEXT_PUBLIC_ALGOLIA_INDEX_NAME: ${{ secrets.ALGOLIA_INDEX_NAME }}