Skip to content

Update index.js

Update index.js #25

Workflow file for this run

name: Deploy to GitHub Pages
on:
push:
branches:
- main # substitua "main" pela sua branch principal
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: '18.x' # Atualize para uma versão suportada, por exemplo, 14.x
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2' # Define a versão do PHP que você precisa
- name: Install dependencies
run: npm install # ou yarn install, caso esteja usando o yarn
- name: Install dependencies for WebSocket
run: npm install # ou yarn install, caso esteja usando o yarn
working-directory: ws # Define o diretório para a instalação do pacote
- name: Build the application
run: |
serve dist/ & # inicia o servidor de arquivos estáticos
php -S localhost:8000 -t api & # inicia o servidor PHP
node ws/main.js & # inicia o servidor WebSocket
- name: Deploy to GitHub Pages
run: |
touch index.html
echo 'Seu site está funcionando no GitHub Pages!' > index.html
env:
BASEURL: /Gearing # substitua <repositorio> pelo nome do seu repositório
- name: Deploy
run: |
git config --global user.name 'Guilhermevalenca'
git config --global user.email '[email protected]'
git add .
git commit -m "Deploy to GitHub Pages"
git push origin main
env:
GH_TOKEN: ${{secrets.GH_TOKEN}}
dependabot: # Fluxo de trabalho do Dependabot
runs-on: ubuntu-latest
if: ${{ github.actor == 'dependabot[bot]' }}
steps:
- uses: actions/setup-node@v2
with:
node-version: '14'
- uses: actions/checkout@v2
with:
persist-credentials: false
fetch-depth: 0
- run: |
git config user.name github-actions[bot]
git config user.email github-actions[bot]@users.noreply.github.com
npm version patch -m "[RELEASE] %s"
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}
- uses: fastify/[email protected]
with:
github-token: ${{ secrets.GITHUB_TOKEN }}