diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..97eae81 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,31 @@ +name: Deploy Angular app to Netlify + +on: + push: + branches: + - main + +jobs: + build-deploy: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version: '18' + + - name: Install dependencies + run: npm install + + - name: Build Angular + run: npm run build --prod + + - name: Deploy to Netlify + run: npx netlify-cli deploy --dir=dist/hello-ci-cd --prod --auth=$NETLIFY_AUTH_TOKEN --site=$NETLIFY_SITE_ID + env: + NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} + NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} diff --git a/src/app/app.component.html b/src/app/app.component.html index de43290..0666914 100644 --- a/src/app/app.component.html +++ b/src/app/app.component.html @@ -1,4 +1,4 @@
-

Hello

+

Hello Test

From {{ domain }}

-
+ \ No newline at end of file