This paper studies an optimal deterministic investment problem for a DC pension plan member with inflation risk. We describe the price processes of the inflation-indexed bond and the stock by a continuous diffusion process and a jump diffusion process with random parameters, respectively. The contribution rate linked to the income of the DC plan member is assumed to be a non-Markovian adapted process. Under the mean-variance criterion, we use Malliavin calculus to derive a characterization for the optimal deterministic investment strategy. In some special cases, we obtain the explicit expressions for the optimal deterministic strategies.