Set YARN_ENABLE_IMMUTABLE_INSTALLS=false #104
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: Deploy Website | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
name: Deploying to surge | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
persist-credentials: false | |
- name: Reconfigure git to use HTTP authentication | |
run: > | |
git config --global url."https://github.com/".insteadOf | |
ssh://[email protected]/ | |
- name: Cache node modules | |
uses: actions/cache@v1 | |
env: | |
cache-name: cache-node-modules | |
with: | |
path: ~/.npm | |
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} | |
- name: Install dependencies | |
run: YARN_ENABLE_IMMUTABLE_INSTALLS=false yarn install && cd web && YARN_ENABLE_IMMUTABLE_INSTALLS=false yarn install | |
- name: Define env variable No.1 | |
uses: TickX/[email protected] | |
with: | |
key: "BOT_SERVER_PATH" | |
value: ${{ secrets.BOT_SERVER_PATH }} | |
envPath: "./web/.env" | |
- name: Define env variable No.2 | |
uses: TickX/[email protected] | |
with: | |
key: "YOUTUBE_API_KEY" | |
value: ${{ secrets.YOUTUBE_API_KEY }} | |
envPath: "./web/.env" | |
- name: Define env variable No.3 | |
uses: TickX/[email protected] | |
with: | |
key: "SPOTIFY_CLIENT_ID" | |
value: ${{ secrets.SPOTIFY_CLIENT_ID }} | |
envPath: "./web/.env" | |
- name: Define env variable No.4 | |
uses: TickX/[email protected] | |
with: | |
key: "SPOTIFY_CLIENT_SECRET" | |
value: ${{ secrets.SPOTIFY_CLIENT_SECRET }} | |
envPath: "./web/.env" | |
- name: Build | |
run: yarn build | |
working-directory: ./web | |
- name: Deploy | |
run: yarn surge ./build ${{ secrets.SURGE_DOMAIN }} --token ${{ secrets.SURGE_TOKEN }} | |
working-directory: ./web |