feat: pass dev option to resolver (#1134) #120
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 | |
on: | |
push: | |
branches: | |
- "main" | |
paths: | |
- "docs/**" | |
- "website/**" | |
- ".github/workflows/deploy-website.yml" | |
permissions: | |
contents: read | |
jobs: | |
deploy: | |
permissions: | |
contents: write # to deploy | |
runs-on: ubuntu-latest | |
if: github.repository == 'facebook/metro' | |
env: | |
working-directory: website | |
node-version: 16.x | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4.1.0 | |
- name: Use Node.js ${{ env.node-version }} | |
uses: actions/setup-node@v3.8.1 | |
with: | |
node-version: ${{ env.node-version }} | |
- name: Get yarn cache directory | |
id: yarn | |
run: echo "::set-output name=dir::$(yarn cache dir)" | |
- name: Restore yarn cache | |
uses: actions/cache@v3.3.2 | |
with: | |
path: ${{ steps.yarn.outputs.dir }} | |
key: ${{ runner.os }}-yarn-${{ hashFiles(format('{0}{1}', github.workspace, '/website/yarn.lock')) }} | |
- name: Install packages | |
working-directory: ${{ env.working-directory }} | |
run: yarn --frozen-lockfile | |
- name: Deploy to GitHub Pages | |
working-directory: ${{ env.working-directory }} | |
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 | |
GIT_USER=${GITHUB_ACTOR} yarn deploy |