Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate to GitHub Actions from CircleCI #4143

Merged
merged 16 commits into from
Jun 12, 2024
69 changes: 69 additions & 0 deletions .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
##CICD Version: v0.0.1
apicgg marked this conversation as resolved.
Show resolved Hide resolved

name: GitHub_CICD
apicgg marked this conversation as resolved.
Show resolved Hide resolved

on:
pull_request:
branches:
- main

jobs:
setup:
runs-on: ubuntu-latest
steps:
- name: Set up Node.js
uses: actions/setup-node@v4

- name: Checkout repository
uses: actions/checkout@v4

- name: Save repository to cache
uses: actions/cache@v4
with:
path: ~/react-native-website
key: v1-repo-${{ github.sha }}
apicgg marked this conversation as resolved.
Show resolved Hide resolved

- name: Install dependencies
run: yarn install --frozen-lockfile --no-progress --non-interactive --cache-folder ~/.cache/yarn

lint:
runs-on: ubuntu-latest
needs: setup
steps:
- name: Restore repository from cache
uses: actions/cache@v4
with:
path: ~/react-native-website
key: v1-repo-${{ github.sha }}
- name: Restore Yarn cache
uses: actions/cache@v4
with:
path: |
node_modules
~/.cache/yarn
key: v1-yarn-${{ github.ref_name }}
- name: Run Lint
run: yarn ci:lint
working-directory: ~/react-native-website/website

build:
runs-on: ubuntu-latest
needs: setup
steps:
- name: Restore repository from cache
uses: actions/cache@v4
with:
path: ~/react-native-website
key: v1-repo-${{ github.sha }}
- name: Restore Yarn cache
uses: actions/cache@v4
with:
path: |
node_modules
~/.cache/yarn
key: v1-yarn-${{ github.ref_name }}
- name: Build
run: yarn build
working-directory: ~/react-native-website/website
env:
NODE_OPTIONS: "--max_old_space_size=4096"
Loading