48
48
name : deploy-package-docs
49
49
url : ${{ env.ENV_URL }}
50
50
env :
51
- TARGET : ${{ github.event.inputs.deployment-environment }}
52
51
DEST_REPO : ansible-community/package-doc-builds
53
52
USER_EMAIL : " 41898282+github-actions[bot]@users.noreply.github.com"
54
53
USER_NAME : " github-actions[bot]"
@@ -65,16 +64,16 @@ jobs:
65
64
--one-top-level
66
65
67
66
- name : Set the production branch and url
68
- if : env.TARGET == 'production'
67
+ if : inputs.deployment-environment == 'production'
69
68
env :
70
- BRANCH_NAME : ${{ github.event. inputs.ansible-package-version }}
69
+ BRANCH_NAME : ${{ inputs.ansible-package-version }}
71
70
PROD_URL : https://ansible.readthedocs.io/projects/ansible
72
71
run : |
73
72
echo "BRANCH=${BRANCH_NAME}" >> "${GITHUB_ENV}"
74
73
echo "ENV_URL=${PROD_URL}/${BRANCH_NAME}" >> "${GITHUB_ENV}"
75
74
76
75
- name : Set the test branch and url
77
- if : env.TARGET == 'test'
76
+ if : inputs.deployment-environment == 'test'
78
77
env :
79
78
TEST_URL : https://ansible-community.github.io/package-doc-builds
80
79
run : |
@@ -98,12 +97,10 @@ jobs:
98
97
deploy-directory/docs
99
98
100
99
- name : Create a norobots.txt file for the test site
101
- if : env.TARGET == 'test'
100
+ if : inputs.deployment-environment == 'test'
102
101
run : |
103
- touch norobots.txt
104
- echo "User-agent: *" > norobots.txt
105
- echo "Disallow: /" >> norobots.txt
106
- working-directory : deploy-directory/docs
102
+ echo "User-agent: *" > deploy-directory/docs/norobots.txt
103
+ echo "Disallow: /" >> deploy-directory/docs/norobots.txt
107
104
108
105
- name : Configure the git user
109
106
run : |
0 commit comments