Commit 29221f74 authored by DJOUNANG NANA Guy Rostan's avatar DJOUNANG NANA Guy Rostan
Browse files

fix: upload website_build at CI_PROJECT_DIR regardless of PROJECT_ROOT and add file check-n

parent ccf1875a
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -9,16 +9,22 @@ cargo_doc:
      ADDITIONAL_OPTIONS: ''
    script:
      - cd $PROJECT_ROOT
      - if [ ! -f "Cargo.toml" ]; then
      -   echo "ERROR --> Any Cargo.toml file isn't present in the given folder $PROJECT_ROOT"
      -   exit 1
      - fi
      - if [ ${ONLY_LIB} == "true" ]; then
      -   ADDITIONAL_OPTIONS+=" --lib"
      - fi
      - if [ ${RELEASE_MODE} == "true" ]; then
      -   ADDITIONAL_OPTIONS+=" --release"
      - fi
      - if [ ${CI_PROJECT_DIR} != ${PROJECT_ROOT} ]; then
      -   OUTPUT_FOLDER="${CI_PROJECT_DIR}/${OUTPUT_FOLDER}"
      - fi
      - cargo doc --target-dir ${OUTPUT_FOLDER} $ADDITIONAL_OPTIONS
    artifacts:
      when: always
      expose_as: "Cargo_doc build"
      paths:
        - $OUTPUT_FOLDER
 No newline at end of file
+28 −0
Original line number Diff line number Diff line
## Objective

Deploy your Angular projects to any target (Firebase, Azure, GitHub pages, ...)

## How to use it

1. <Your steps>
1. Add this job URL inside the `include` list of your `.gitlab-ci.yml` file (see the [quick setup](/use-the-hub/#quick-setup)). You can specify [a fixed version](#changelog) instead of `latest`.
    ```yaml
      - remote: 'https://jobs.r2devops.io/latest/ng_deploy.yml'
    ```
1. If you need to customize the job (stage, variables, ...) 👉 check the [jobs
   customization](/use-the-hub/#jobs-customization)
1. Well done, your job is ready to work ! 😀

## Job details

* Job name: `ng_deploy`
* Docker image:
[`node:15.14-buster`](https://hub.docker.com/r/_/node)
* Default stage: `deploy`
* When: `always`

### Variables

| Name | Description | Default |
| ---- | ----------- | ------- |
| `VARIABLE` <img width=100/> | A general variable for this job <img width=175/>| `Hello R2` <img width=100/>|

jobs/ng_deploy/job.yml

0 → 100644
+9 −0
Original line number Diff line number Diff line
name: ng_deploy
description: Deploy your Angular projects to any target (Firebase, Azure, GitHub pages, ...)
default_stage: deploy
icon: :brain:
maintainer: DjNaGuRo
license: MIT
images:
  node:15.14-buster
tools:
 No newline at end of file
+10 −0
Original line number Diff line number Diff line
stages:
  - deploy

ng_deploy:
    image: node:15.14-buster
    stage: deploy
    variables:
      VARIABLE: "Hello R2"
    script:
      - echo "${VARIABLE}"
+0 −0

Empty file added.

Loading