Skip to content

Update actions file

Update actions file #7

Workflow file for this run

name: CI
on:
push:
branches: [main, production]
pull_request:
branches: [main]
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '20'
cache: 'npm'
- run: npm ci
- name: Lint
run: npm run lint
env:
DATABASE_URL: ${{ secrets.DATABASE_URL }}
NEXTAUTH_SECRET: ${{ secrets.NEXTAUTH_SECRET }}
NEXTAUTH_URL: ${{ secrets.NEXTAUTH_URL }}
DISCORD_CLIENT_ID: ${{ secrets.DISCORD_CLIENT_ID }}
DISCORD_CLIENT_SECRET: ${{ secrets.DISCORD_CLIENT_SECRET }}
GITHUB_CLIENT_ID: ${{ secrets.GITHUB_CLIENT_ID }}
GITHUB_CLIENT_SECRET: ${{ secrets.GITHUB_CLIENT_SECRET }}
TWITTER_CLIENT_ID: ${{ secrets.TWITTER_CLIENT_ID }}
TWITTER_CLIENT_SECRET: ${{ secrets.TWITTER_CLIENT_SECRET }}
NODE_ENV: ${{ github.ref == 'refs/heads/production' && 'production' || 'development' }}
# test:
# name: Test
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3
# - uses: actions/setup-node@v3
# with:
# node-version: '20'
# cache: 'npm'
# - run: npm ci
# - run: npm test
build:
name: Build
runs-on: ubuntu-latest
needs: [lint, test]

Check failure on line 49 in .github/workflows/ci.yml

View workflow run for this annotation

GitHub Actions / CI

Invalid workflow file

The workflow is not valid. .github/workflows/ci.yml (Line: 49, Col: 19): Job 'build' depends on unknown job 'test'. .github/workflows/ci.yml (Line: 65, Col: 13): Job 'deploy' depends on job 'build' which creates a cycle in the dependency graph.
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '20'
cache: 'npm'
- run: npm ci
- name: Build
run: npm run build
env:
NODE_ENV: ${{ github.ref == 'refs/heads/production' && 'production' || 'preview' }}
deploy:
name: Deploy
runs-on: ubuntu-latest
needs: [build]
if: github.event_name == 'push' && github.ref == 'refs/heads/production'
steps:
- name: Deploy to Production
run: echo "Deploying to production"
# Add your deployment steps here