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

create-a-feature #241

Open
wants to merge 60 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
05d79cc
Create hello.yml
tuongroth Oct 15, 2024
ebab573
Create main.yml
tuongroth Oct 15, 2024
0f0ea29
Update hello.yml
tuongroth Oct 15, 2024
0a9b2e1
Create pipeline.yml
tuongroth Oct 15, 2024
b043615
Update pipeline.yml
tuongroth Oct 16, 2024
60a472a
Update pipeline.yml
tuongroth Oct 16, 2024
346b7bd
Update pipeline.yml
tuongroth Oct 16, 2024
677b7ac
Update pipeline.yml
tuongroth Oct 16, 2024
b31a546
Update pipeline.yml
tuongroth Oct 16, 2024
8800805
Update pipeline.yml
tuongroth Oct 16, 2024
cd0b04c
Update pipeline.yml
tuongroth Oct 16, 2024
87856ad
Update pipeline.yml
tuongroth Oct 16, 2024
cff5a22
Update pipeline.yml
tuongroth Oct 16, 2024
a45ef03
Update pipeline.yml
tuongroth Oct 16, 2024
06cac84
Update pipeline.yml
tuongroth Oct 16, 2024
aa0127f
Update pipeline.yml
tuongroth Oct 16, 2024
2d27d0e
Update pipeline.yml
tuongroth Oct 16, 2024
7619b4b
Create secrect.yml
tuongroth Oct 16, 2024
653af50
Update secrect.yml
tuongroth Oct 16, 2024
2c313dd
Update pipeline.yml
tuongroth Oct 16, 2024
e576361
Update pipeline.yml
tuongroth Oct 16, 2024
46955cd
Create fly.toml
tuongroth Oct 16, 2024
c146fc4
Create fly.yml
tuongroth Oct 16, 2024
e88d69d
Update pipeline.yml
tuongroth Oct 16, 2024
4918262
Create deployy.yaml
tuongroth Oct 16, 2024
a745842
Update secrect.yml
tuongroth Oct 16, 2024
2a8acc9
Update secrect.yml
tuongroth Oct 16, 2024
74b4703
Update secrect.yml
tuongroth Oct 16, 2024
72e2fce
Update secrect.yml
tuongroth Oct 16, 2024
d05ce95
Update pipeline.yml
tuongroth Dec 4, 2024
9baaf99
Update pipeline.yml
tuongroth Dec 4, 2024
5cdc51e
Create exercise11.1.md
tuongroth Dec 4, 2024
ef218d7
Update pipeline.yml
tuongroth Dec 4, 2024
814e835
Update pipeline.yml
tuongroth Dec 4, 2024
0c428ad
Update pipeline.yml
tuongroth Dec 4, 2024
ec72728
Update pipeline.yml
tuongroth Dec 4, 2024
d9a7a3b
Update pipeline.yml
tuongroth Dec 4, 2024
50b260b
Update pipeline.yml
tuongroth Dec 4, 2024
a855979
Update pipeline.yml
tuongroth Dec 4, 2024
8f5bc3a
Update pipeline.yml
tuongroth Dec 4, 2024
bb811bd
Update secrect.yml
tuongroth Dec 4, 2024
741ee91
Update pipeline.yml
tuongroth Dec 4, 2024
2ada9de
Update fly.yml
tuongroth Dec 4, 2024
542fb5a
Update deployy.yaml
tuongroth Dec 4, 2024
10e7272
Update fly.yml
tuongroth Dec 4, 2024
d8a4cb6
Update fly.yml
tuongroth Dec 4, 2024
0fe4d14
Update deployy.yaml
tuongroth Dec 4, 2024
b6f630a
Update deployy.yaml
tuongroth Dec 4, 2024
ffbeeef
Update deployy.yaml
tuongroth Dec 4, 2024
ef3372d
Rename deployy.yaml to deployy.yaml
tuongroth Dec 4, 2024
3c23a63
Update secrect.yml
tuongroth Dec 4, 2024
5eb29e0
Update secrect.yml
tuongroth Dec 4, 2024
769649e
Update secrect.yml
tuongroth Dec 4, 2024
dda7e35
Update fly.yml
tuongroth Dec 4, 2024
350b6ca
Update README.md
tuongroth Dec 6, 2024
e192e3e
Update README.md
tuongroth Dec 6, 2024
71cc18a
Update main.yml
tuongroth Dec 6, 2024
d8afb0d
Update main.yml
tuongroth Dec 6, 2024
de2a0f7
Update pipeline.yml
tuongroth Dec 6, 2024
cffb7f4
Update PokemonPage.jest.spec.jsx
tuongroth Dec 6, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update pipeline.yml
  • Loading branch information
tuongroth authored Dec 4, 2024
commit 814e8359a8db4647e21dcb72cd95d9640fd86410
61 changes: 31 additions & 30 deletions .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
@@ -1,39 +1,40 @@
name: Deployment pipeline
name: Deploy to Fly.io

on:
push:
branches:
- main
- main # Trigger deployment on push to the main branch

jobs:
simple_deployment_pipeline:
runs-on: ubuntu-20.04
build-and-deploy:
runs-on: ubuntu-latest # Use an Ubuntu environment

steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '16' # Set the Node.js version to use (this matches your requirement)

- name: Install dependencies
run: npm install # Install the necessary dependencies

- name: Build the production version
run: npm run build # Build the project (this assumes the build script is configured in package.json)

- name: Install Flyctl
run: |
curl -L https://fly.io/install.sh | sh # Install the Fly.io CLI

- name: Deploy to Fly.io
run: |
export FLY_API_TOKEN=${{ secrets.FLY_API_TOKEN }} # Set the Fly.io API token as an environment variable
flyctl auth token $FLY_API_TOKEN # Authenticate with Fly.io using the token
flyctl deploy # Deploy to Fly.io

# Set up Node.js (if not already set up)
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '16' # Choose the appropriate Node.js version
- name: View logs
run: |
flyctl logs --follow # Follow logs to monitor the deployment process

# Install dependencies
- name: Install dependencies
run: npm install

# Start the app in production mode
- name: Start the app
run: npm run start-prod &

# Wait for the server to be ready
- name: Wait for server to be ready
run: npx wait-on http://localhost:5000

# E2E tests
- name: E2E tests
uses: cypress-io/github-action@v5
with:
command: npm run test:e2e
start: npm run start-prod
wait-on: http://localhost:8081